Skip to content

Commit e285363

Browse files
committed
Record analytics *after* a command is complete
1 parent 5cc4cf0 commit e285363

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/analytics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ def analyze(event_id):
2828
def decorator(function):
2929
@wraps(function)
3030
def wrapper(*args, **kwargs):
31-
post(event_id)
31+
result = function(*args, **kwargs)
3232

33-
return function(*args, **kwargs)
33+
# record the analytics *after* a function is done
34+
post(event_id)
35+
return result
3436

3537
return wrapper
3638

0 commit comments

Comments
 (0)