Skip to content

Instantly share code, notes, and snippets.

@victoraguilarc
Created February 19, 2019 21:24
Show Gist options
  • Save victoraguilarc/79db7fde2f3c95ebadcf0a5bd1bcc247 to your computer and use it in GitHub Desktop.
Save victoraguilarc/79db7fde2f3c95ebadcf0a5bd1bcc247 to your computer and use it in GitHub Desktop.
def clean_inactive_devices(f):
"""
This turns as inactive to the unused devices
"""
@wraps(f)
def decorated(*args, **kwargs):
# process anythin BEFORE
results, device_tokens = f(*args, **kwargs)
# process anythin AFTER
return results, device_tokens
return decorated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment