Skip to content

Commit

Permalink
Record analytics *after* a command is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Jun 6, 2024
1 parent 0a6807f commit ad5e994
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ def analyze(event_id):
def decorator(function):
@wraps(function)
def wrapper(*args, **kwargs):
post(event_id)
result = function(*args, **kwargs)

return function(*args, **kwargs)
# record the analytics *after* a function is done
post(event_id)
return result

return wrapper

Expand Down

0 comments on commit ad5e994

Please sign in to comment.