File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,12 +165,16 @@ def submit_major_project(user_dict=None):
165165
166166
167167 # Send the slack ping only after we know that the data was properly saved to the DB
168- send_slack_ping (
169- {
170- "text" : f"<!subteam^S5XENJJAH> *{ get_member_name (user_id )} * ({ user_id } )"
171- f" submitted their major project, *{ name } *!"
172- }
173- )
168+ if app .config ['DEV_DISABLE_SLACK_PING' ]:
169+ log .info ("Slack ping skipped due to environment override" )
170+ else :
171+ send_slack_ping (
172+ {
173+ "text" : f"<!subteam^S5XENJJAH> *{ get_member_name (user_id )} * ({ user_id } )"
174+ f" submitted their major project, *{ name } *!"
175+ }
176+ )
177+
174178
175179 return jsonify ({"success" : True }), 200
176180
Original file line number Diff line number Diff line change 1515IP = env .get ("CONDITIONAL_IP" , "0.0.0.0" )
1616PORT = env .get ("CONDITIONAL_PORT" , 6969 )
1717WEBHOOK_URL = env .get ("CONDITIONAL_WEBHOOK_URL" , "INSERT URL HERE" )
18+ DEV_DISABLE_SLACK_PING = env .get ("DEV_DISABLE_SLACK_PING" , "false" ) == "true"
1819PROFILING = env .get ("CONDITIONAL_PROFILING" , "false" ).lower () == "true"
1920
2021# DB Info
You can’t perform that action at this time.
0 commit comments