teams-alerter 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- teams_alerter/core.py +5 -7
- teams_alerter/utils.py +1 -0
- {teams_alerter-0.1.1.dist-info → teams_alerter-0.1.3.dist-info}/METADATA +5 -6
- teams_alerter-0.1.3.dist-info/RECORD +7 -0
- teams_alerter-0.1.1.dist-info/RECORD +0 -7
- {teams_alerter-0.1.1.dist-info → teams_alerter-0.1.3.dist-info}/WHEEL +0 -0
- {teams_alerter-0.1.1.dist-info → teams_alerter-0.1.3.dist-info}/top_level.txt +0 -0
teams_alerter/core.py
CHANGED
@@ -2,15 +2,15 @@ import json
|
|
2
2
|
import traceback
|
3
3
|
|
4
4
|
from google.cloud import pubsub_v1
|
5
|
-
from utils import ErrorUtils, DateUtils
|
5
|
+
from .utils import ErrorUtils, DateUtils
|
6
6
|
|
7
7
|
|
8
8
|
class TeamsAlerter:
|
9
|
+
|
9
10
|
def __init__(
|
10
11
|
self,
|
11
|
-
utils,
|
12
|
-
|
13
|
-
teams_channel,
|
12
|
+
utils: ErrorUtils,
|
13
|
+
teams_channel: str,
|
14
14
|
detail,
|
15
15
|
level,
|
16
16
|
environment=None,
|
@@ -19,7 +19,6 @@ class TeamsAlerter:
|
|
19
19
|
teams_template=None,
|
20
20
|
):
|
21
21
|
self.utils = utils
|
22
|
-
self.app_name = app_name
|
23
22
|
self.teams_channel = teams_channel
|
24
23
|
self.detail = detail
|
25
24
|
self.environment = environment
|
@@ -36,7 +35,6 @@ class TeamsAlerter:
|
|
36
35
|
|
37
36
|
teams_alerter = TeamsAlerter(
|
38
37
|
utils=utils,
|
39
|
-
app_name="datastream-transaction-pub",
|
40
38
|
teams_channel=f"datastream-{utils['env']}-alerts",
|
41
39
|
detail=f"Error type: {error_type}\nError message: {error_message}\nError traceback: {error_traceback}",
|
42
40
|
level="ERROR",
|
@@ -50,7 +48,7 @@ class TeamsAlerter:
|
|
50
48
|
utc_timestamp = DateUtils.get_str_utc_timestamp()
|
51
49
|
payload = json.dumps(
|
52
50
|
{
|
53
|
-
"app_name": self.app_name,
|
51
|
+
"app_name": self.utils["app_name"],
|
54
52
|
"teams_channel": self.teams_channel,
|
55
53
|
"detail": self.detail,
|
56
54
|
"level": self.level,
|
teams_alerter/utils.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: teams-alerter
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: Module pour envoyer des alertes Teams via Pub/Sub
|
5
5
|
Author-email: Toki <t.bakotondrabe-ext@paris-turf.com>
|
6
6
|
License: MIT
|
@@ -76,11 +76,10 @@ twine upload dist/*
|
|
76
76
|
|
77
77
|
```
|
78
78
|
teams-alerter/
|
79
|
-
├──
|
80
|
-
│
|
81
|
-
│
|
82
|
-
│
|
83
|
-
│ └── utils.py
|
79
|
+
├── teams_alerter/
|
80
|
+
│ ├── __init__.py
|
81
|
+
│ ├── core.py
|
82
|
+
│ └── utils.py
|
84
83
|
├── pyproject.toml
|
85
84
|
├── README.md
|
86
85
|
└── dist/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
teams_alerter/__init__.py,sha256=J6zyyTfUNVElXD0wsTqBwp-VtcApbzYGUPpChrdcbpY,131
|
2
|
+
teams_alerter/core.py,sha256=NsMUReT8TGuzEGpR4g1uRvhvIv9x8kCjIidR5sx_pe8,2675
|
3
|
+
teams_alerter/utils.py,sha256=aWQJYj9a916iEb-F0YyaOiXO3xQkgrbmyEE2OGn2uss,634
|
4
|
+
teams_alerter-0.1.3.dist-info/METADATA,sha256=5WypSuD5mgQ_5hsXZwlelQ_zRVoplGpWCK9oMcA4WS8,2194
|
5
|
+
teams_alerter-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
+
teams_alerter-0.1.3.dist-info/top_level.txt,sha256=Qt8-VgHT7YPTbMzYkAomK9itC-w4YpV7IJ5X6b-TC-4,14
|
7
|
+
teams_alerter-0.1.3.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
teams_alerter/__init__.py,sha256=J6zyyTfUNVElXD0wsTqBwp-VtcApbzYGUPpChrdcbpY,131
|
2
|
-
teams_alerter/core.py,sha256=xKu6ZVxxk4GcZfeAI2e_WSjo_sQp8iGXdJhv8RTVQeI,2751
|
3
|
-
teams_alerter/utils.py,sha256=1rCiwatP_ZbIPCQlttk1rkV1ZZqQNOimobbQMnL1LYM,615
|
4
|
-
teams_alerter-0.1.1.dist-info/METADATA,sha256=EnXCu-jNFAX6G6lGDeGbIAFcrrMDyGw8icXbF8N32Bc,2228
|
5
|
-
teams_alerter-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
-
teams_alerter-0.1.1.dist-info/top_level.txt,sha256=Qt8-VgHT7YPTbMzYkAomK9itC-w4YpV7IJ5X6b-TC-4,14
|
7
|
-
teams_alerter-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|