Skip to content

Commit

Permalink
refactor: 예외 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
leehjhjhj committed Aug 16, 2023
1 parent 24fc6d9 commit 9b975f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions call/models/assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ def make_call_group_name(assign_pk=None):
return f"call-{assign_pk}"

def call__on_post_save(instance: Assign, created: bool, **kwargs):
websocket_message(instance, created)
if not created:
send_push_notification(instance)
try:
if not created:
send_push_notification(instance)
except:
print("푸시 알람 실패")
finally:
websocket_message(instance, created)

post_save.connect(
call__on_post_save,
Expand Down

0 comments on commit 9b975f6

Please sign in to comment.