Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notification mechanism #28

Merged
merged 45 commits into from
Nov 18, 2022
Merged

Add notification mechanism #28

merged 45 commits into from
Nov 18, 2022

Conversation

vict0rsch
Copy link
Collaborator

Using ntfy_wrapper I implemented a notification mechanism for

  • Job starts
  • Job has error
  • Job ends (notify Overall MAE)

To do:

@vict0rsch
Copy link
Collaborator Author

The gist of it is that Logger now has a fault-safe method .ntfy that lazy-loads a self._ntfy attribute as a ntfy_wrapper.Notifier and uses it to dispatch notifications.

If anything wrong happens within that function, a warning is printed and the function is disabled (by setting a global var NTFY_OK to False).

This mechanism will also prevent errors in the case of ntfy_wrapper not being installed or its config file (.ntfy.conf) being malformed.

@vict0rsch vict0rsch mentioned this pull request Nov 16, 2022
4 tasks
@vict0rsch
Copy link
Collaborator Author

Merging with QM9

@vict0rsch vict0rsch merged commit 5186db4 into dev Nov 18, 2022
@vict0rsch vict0rsch deleted the notify branch November 18, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant