Exemple #1
0
    def createEvent(self, event):
        parsed = informer.parseSetup(event.setup)
        project = parsed['project']
        shot = parsed['shot']
        eventsUrl = informer.getProjectShotEventsUrl(project, shot, 'xml')

        data = {}
        data['created_on'] = event.date
        data['created_by'] = event.user
        data['type'] = event.event
        data['setup'] = event.setup
        data['volume'] = event.volume
        data['host'] = event.hostname

        # if event.__class__.__name__ == 'DiscreetAppBatchProcessEvent':
        #    data['outputs'] = ','.join(event.outputs)

        LOG.warn(''.join(['-'*20, 'Event', '-'*20]))
        for (key, val) in data.items():
            LOG.warn("%s: %s" % (key, val))
        LOG.warn(''.join(['-'*20, '---------', '-'*20]))

        result = self.POST(eventsUrl, data)
Exemple #2
0
conf = instinctual.getConf()

pat_project = '[^/]+'
pat_shot    = '[^/]+'
pat_note    = '(\d+)'
pat_element = '(\d+)'

xml_url_shots           = rel(informer.getShotsUrl(format='xml'))
xml_url_projects        = rel(informer.getProjectsUrl(format='xml'))
xml_url_project_shots   = rel(informer.getProjectShotsUrl(pat_project, format='xml'))
xml_url_note            = rel(informer.getProjectShotNoteUrl(pat_project, pat_shot, pat_note, format='xml'))
xml_url_notes           = rel(informer.getProjectShotNotesUrl(pat_project, pat_shot, format='xml'))
xml_url_element         = rel(informer.getProjectShotElementUrl(pat_project, pat_shot, pat_element, format='xml'))
xml_url_elements        = rel(informer.getProjectShotElementsUrl(pat_project, pat_shot, format='xml'))
xml_url_users           = rel(informer.getUsersUrl(format='xml'))
xml_url_events          = rel(informer.getProjectShotEventsUrl(pat_project, pat_shot, format='xml'))
xml_url_frames          = rel(informer.getFramesUrl(format='xml'))
xml_url_renders         = rel(informer.getProjectShotRendersUrl(pat_project, pat_shot, format='xml'))
xml_url_logs            = rel(informer.getProjectShotLogsUrl(pat_project, pat_shot, format='xml'))

json_url_shots           = rel(informer.getShotsUrl(format='json'))
json_url_projects        = rel(informer.getProjectsUrl(format='json'))
json_url_project_shots   = rel(informer.getProjectShotsUrl(pat_project, format='json'))
json_url_note            = rel(informer.getProjectShotNoteUrl(pat_project, pat_shot, pat_note, format='json'))
json_url_notes           = rel(informer.getProjectShotNotesUrl(pat_project, pat_shot, format='json'))
json_url_element         = rel(informer.getProjectShotElementUrl(pat_project, pat_shot, pat_element, format='json'))
json_url_elements        = rel(informer.getProjectShotElementsUrl(pat_project, pat_shot, format='json'))
json_url_users           = rel(informer.getUsersUrl(format='json'))
json_url_events          = rel(informer.getProjectShotEventsUrl(pat_project, pat_shot, format='json'))
json_url_frames          = rel(informer.getFramesUrl(format='json'))
json_url_renders         = rel(informer.getProjectShotRendersUrl(pat_project, pat_shot, format='json'))