mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Avoid that threads of the same type can be executed twice or thrice etc.
This commit is contained in:
@ -24,4 +24,4 @@ class Notification(EmailMessage):
|
||||
|
||||
def set_addresses(self, sender, recipient):
|
||||
self['From'] = sender
|
||||
self['to'] = recipient
|
||||
self['to'] = recipient
|
||||
|
@ -8,10 +8,10 @@ class NotificationService(object):
|
||||
def __init__(self, execute_flag):
|
||||
super(NotificationService, self).__init__()
|
||||
self.execute_flag = execute_flag # If True mails are sent normaly
|
||||
# If False mails are not sent. Used to avoid sending mails for jobs that
|
||||
# have been completed a long time ago. Use this if you implement notify
|
||||
# into an already existing nopaque instance. Change it to True after the
|
||||
# daemon has run one time with the flag set to False
|
||||
# If False mails are not sent. Used to avoid sending mails for jobs
|
||||
# that have been completed a long time ago. Use this if you implement
|
||||
# notify into an already existing nopaque instance. Change it to True
|
||||
# after the daemon has run one time with the flag set to False
|
||||
self.not_sent = {} # Holds due to an error unsent email notifications
|
||||
self.mail_limit_exceeded = False # Bool to show if the mail server
|
||||
# stoped sending mails due to exceeding its sending limit
|
||||
@ -38,4 +38,4 @@ class NotificationService(object):
|
||||
return
|
||||
|
||||
def quit(self):
|
||||
self.smtp_server.quit()
|
||||
self.smtp_server.quit()
|
||||
|
Reference in New Issue
Block a user