Skip to content
Snippets Groups Projects
Commit bbcf5c53 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Add some documentation

parent 3a989534
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,14 @@ def admin_required(f):
def background(f):
''' This decorator executes a function in a Thread '''
'''
' This decorator executes a function in a Thread.
' Decorated functions need to be executed within a code block where an
' app context exists.
'
' NOTE: An app object is passed as a keyword argument to the decorated
' function.
'''
@wraps(f)
def wrapped(*args, **kwargs):
kwargs['app'] = current_app._get_current_object()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment