def set_modified_on(f):
 from mkt.site.tasks import set_modified_on_object
 @functools.wraps(f)
 def wrapper(*args, **kw):
  objs = kw.pop('set_modified_on', None)
  result = f(*args, **kw)
  if (objs and result):
   extra_kwargs = (result if isinstance(result, dict) else {})
   for obj in objs:
    task_log.info(('Delaying setting modified on object: %s, %s' % (obj.__class__.__name__, obj.pk)))
    set_modified_on_object.apply_async(args=[obj._meta.app_label, obj._meta.model_name, obj.pk], kwargs=extra_kwargs, eta=(datetime.datetime.now() + datetime.timedelta(seconds=settings.NFS_LAG_DELAY)))
  return result
 return wrapper

def set_modified_on ( f ) : from mkt . site . tasks import set_modified_on_object @ functools . wraps ( f ) def wrapper ( * args , ** kw ) : objs = kw . pop ( 'set_modified_on' , None ) result = f ( * args , ** kw ) if ( objs and result ) : extra_kwargs = ( result if isinstance ( result , dict ) else { } ) for obj in objs : task_log . info ( ( 'Delaying setting modified on object: %s, %s' % ( obj . __class__ . __name__ , obj . pk ) ) ) set_modified_on_object . apply_async ( args = [ obj . _meta . app_label , obj . _meta . model_name , obj . pk ] , kwargs = extra_kwargs , eta = ( datetime . datetime . now ( ) + datetime . timedelta ( seconds = settings . NFS_LAG_DELAY ) ) ) return result return wrapper
will update the modified timestamp on the provided objects when the wrapped function exits sucessfully .