def run_postcommit(once_per_request=True, celery=False):
 def wrapper(func):
  if settings.DEBUG_MODE:
   return func
  @functools.wraps(func)
  def wrapped(*args, **kwargs):
   enqueue_postcommit_task(func, args, kwargs, celery=celery, once_per_request=once_per_request)
  return wrapped
 return wrapper

def run_postcommit ( once_per_request = True , celery = False ) : def wrapper ( func ) : if settings . DEBUG_MODE : return func @ functools . wraps ( func ) def wrapped ( * args , ** kwargs ) : enqueue_postcommit_task ( func , args , kwargs , celery = celery , once_per_request = once_per_request ) return wrapped return wrapper
delays function execution until after the requests transaction has been committed .