Skip to content

Commit 6cd5bcf

Browse files
committed
send success message from within try block #289
1 parent 4c28f74 commit 6cd5bcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mapswipe_workers/mapswipe_workers/mapswipe_workers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ def _run_create_projects():
9191
project.calc_required_results()
9292
# Save project and its groups and tasks to Firebase and Postgres.
9393
project.save_project()
94+
send_slack_message("success", project_name, project.projectId)
95+
logger.info("Success: Project Creation ({0})".format(project_name))
9496
except CustomError:
9597
ref = fb_db.reference(f"v2/projectDrafts/{project_draft_id}")
9698
ref.set({})
9799
send_slack_message("fail", project_name, project.projectId)
98100
logger.exception("Failed: Project Creation ({0}))".format(project_name))
99101
sentry.capture_exception()
100-
send_slack_message("success", project_name, project.projectId)
101-
logger.info("Success: Project Creation ({0})".format(project_name))
102102
continue
103103

104104

0 commit comments

Comments
 (0)