You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest modification, I added an option to specify where to dump the received alerts in the subscribe method.
By default it is None and if this is the case, it fetches from the test_config.envhere
Then, there is this helper function here which makes a name with the current date like; '0_2022-03-11_ALERT.json' the first zero being the index i.e. it is the first alert message on 2022-03-11 and my idea was to increase this if there are more messages within the same day. This same name is also passed to CLI's --plugin option, so we call any given custom script with name (e.g. on 1st of April, we receive an alert, and you have a follow-up script named 'customscript.py', as soon as the alert comes, save the JSON, and call python customscript.py 0_2022-04-01_ALERT.json so it always finds the correct alert and does stuff)
Now there are two open issues;
1 - The counter is not yet properly implemented (I could use help)
2 - We should decide on how to handle the UPDATE alerts.
- We can make a new JSON each time, and say '0_<date>_ALERT-UPDATED.json'
- or we can overwrite the same JSON
I guess for the updates, I'd go for the former, as files do not occupy a lot, and people might wanna go back and say "oh at first, there was this message and I did that, and then this one with the updates caused this etc"
The text was updated successfully, but these errors were encountered:
Do you mean completely ignoring any updates and keeping only the alerts formed by the first two messages? Or, do you mean only saving them as ...ALERT.json and since there is a sublist number, the user can interpret whether this is an update of the previous alert or not?
In the latest modification, I added an option to specify where to dump the received alerts in the
subscribe
method.By default it is
None
and if this is the case, it fetches from thetest_config.env
hereThen, there is this helper function here which makes a name with the current date like;
'0_2022-03-11_ALERT.json'
the first zero being the index i.e. it is the first alert message on2022-03-11
and my idea was to increase this if there are more messages within the same day. This same name is also passed to CLI's--plugin
option, so we call any given custom script with name (e.g. on 1st of April, we receive an alert, and you have a follow-up script named'customscript.py'
, as soon as the alert comes, save the JSON, and callpython customscript.py 0_2022-04-01_ALERT.json
so it always finds the correct alert and does stuff)Now there are two open issues;
1 - The counter is not yet properly implemented (I could use help)
2 - We should decide on how to handle the UPDATE alerts.
- We can make a new JSON each time, and say
'0_<date>_ALERT-UPDATED.json'
- or we can overwrite the same JSON
I guess for the updates, I'd go for the former, as files do not occupy a lot, and people might wanna go back and say "oh at first, there was this message and I did that, and then this one with the updates caused this etc"
The text was updated successfully, but these errors were encountered: