Skip to content

Commit

Permalink
Follow up previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jun 5, 2024
1 parent ba278eb commit 4935bd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions wfsOutputExtension/plausible.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@


# For testing purpose, to test.
# Similar to QGIS dashboard https://feed.qgis.org/metabase/public/dashboard/df81071d-4c75-45b8-a698-97b8649d7228
# Similar to QGIS dashboard
# https://feed.qgis.org/metabase/public/dashboard/df81071d-4c75-45b8-a698-97b8649d7228
# We only collect data listed in the list below
# and the country according to IP address.
# The IP is not stored by Plausible Community Edition https://github.com/plausible/analytics
Expand Down Expand Up @@ -118,13 +119,15 @@ def _send_stat_event() -> bool:
}

# noinspection PyArgumentList
r: QNetworkReply = QgsNetworkAccessManager.instance().post(request, QByteArray(str.encode(json.dumps(data))))
r: QNetworkReply = QgsNetworkAccessManager.instance().post(
request, QByteArray(str.encode(json.dumps(data))))
if not is_lizcloud:
return True

logger = Logger()
message = (
f"Request HTTP OS process '{os.getpid()}' sent to '{plausible_url}' with domain '{plausible_domain} : ")
f"Request HTTP OS process '{os.getpid()}' sent to '{plausible_url}' with domain "
f"'{plausible_domain} : ")
if r.error() == QNetworkReply.NoError:
logger.info(message + "OK")
else:
Expand Down
4 changes: 1 addition & 3 deletions wfsOutputExtension/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import configparser

from pathlib import Path
from typing import Dict, Tuple, Union
from typing import Union

from qgis.core import Qgis, QgsMessageLog

from atlasprint.logger import Logger


def version() -> str:
""" Returns the Lizmap current version. """
Expand Down

0 comments on commit 4935bd8

Please sign in to comment.