def on_file_edit(obj, event): if IRelationBrokenEvent.providedBy(event): # these trigger too much! return try: tasks.file_edited.delay(obj) except CannotGetPortalError: pass
def on_youtube_video_edit(obj, event): if IRelationBrokenEvent.providedBy(event): # these trigger too much! return value = getattr(obj, '_youtube_video_id', None) if value: try: tasks.youtube_video_edited.delay(obj) except CannotGetPortalError: pass
def onContentModified(obj, event): if IRelationBrokenEvent.providedBy(event): # these trigger too much! return if obj.portal_type == 'Dashboard': return try: tasks.scan_links.delay('/'.join(obj.getPhysicalPath())) except CannotGetPortalError: pass _touchContributors(obj)
def on_content_modified(obj, event): obj.changeNote = get_change_note(getRequest()) if IRelationBrokenEvent.providedBy(event): # these trigger too much! return if obj.portal_type == 'Dashboard': return try: tasks.scan_links.delay('/'.join(obj.getPhysicalPath())) except CannotGetPortalError: pass _touch_contributors(obj)
def on_object_event(obj, event): if IRelationBrokenEvent.providedBy(event): # these trigger too much! return audit.event(obj, event)