Skip to content
Snippets Groups Projects
Commit 8ba5c7d2 authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Add flags to denote task success

parent 7f4ff580
No related branches found
No related tags found
6 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!51Fix acct create wait,!39WIP:Feat cod rmq,!38WIP: Feat cod rmq,!30Feat subscribe mail lists
...@@ -28,6 +28,7 @@ def mail_list_subscription(ch, method, properties, body): ...@@ -28,6 +28,7 @@ def mail_list_subscription(ch, method, properties, body):
listserv_cmd['hpc_users'] = f'QUIET ADD hpc-users {email} {fullname}' listserv_cmd['hpc_users'] = f'QUIET ADD hpc-users {email} {fullname}'
print("Adding user{} to mail list".format(username)) print("Adding user{} to mail list".format(username))
success = False
try: try:
# Create a text/plain message # Create a text/plain message
email_msg = EmailMessage() email_msg = EmailMessage()
...@@ -45,6 +46,7 @@ def mail_list_subscription(ch, method, properties, body): ...@@ -45,6 +46,7 @@ def mail_list_subscription(ch, method, properties, body):
print(email_msg) print(email_msg)
s.quit() s.quit()
success = True
except: except:
e = sys.exc_info()[0] e = sys.exc_info()[0]
print("[{}]: Error: {}".format(task, e)) print("[{}]: Error: {}".format(task, e))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment