Skip to content

Commit

Permalink
edited alarm
Browse files Browse the repository at this point in the history
  • Loading branch information
jermxt committed Oct 16, 2022
1 parent 070b22f commit 1be64ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/twilio_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@
@twilio_bp.route('/activateAlarm/', methods=['POST'])
def explode():
data = request.json
session = Session()
data['friends'] = session.query(User.oncall).filter_by(username=data['username']).first()
data['friends'] = data['friends'][0]
ret = {}
process = Process(target=childProcess, args=(data,queue,manager))
process.start()
ret["success"] = True
session.close()
return jsonify(ret)

def childProcess(data, queue, manager):
friends = data["friends"]

session = Session()

response = VoiceResponse()
Expand Down Expand Up @@ -66,6 +71,7 @@ def childProcess(data, queue, manager):
break
if len(queue[phoneNum]) == 0:
del queue[phoneNum]
session.close()

@twilio_bp.route('/testSend/', methods=['GET'])
def test():
Expand Down

0 comments on commit 1be64ac

Please sign in to comment.