def wrapper(*args, **kw): objs = kw.pop("set_modified_on", None) result = f(*args, **kw) if objs and result: 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], kwargs=None, countdown=settings.MODIFIED_DELAY) return result
def wrapper(*args, **kw): objs = kw.pop('set_modified_on', None) result = f(*args, **kw) if objs and result: 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], kwargs=None, countdown=settings.MODIFIED_DELAY) return result
def wrapper(*args, **kw): objs = kw.pop('set_modified_on', None) result = f(*args, **kw) if objs and result: 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], kwargs=None, eta=(datetime.datetime.now() + datetime.timedelta(seconds=settings.NFS_LAG_DELAY))) return result