コード例 #1
0
def on_file_edit(obj, event):
    if IRelationBrokenEvent.providedBy(event):
        # these trigger too much!
        return

    try:
        tasks.file_edited.delay(obj)
    except CannotGetPortalError:
        pass
コード例 #2
0
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
コード例 #3
0
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)
コード例 #4
0
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)
コード例 #5
0
def on_object_event(obj, event):
    if IRelationBrokenEvent.providedBy(event):
        # these trigger too much!
        return
    audit.event(obj, event)