Deadline to webservice works.... but I want to improve it

I used the deadline slack notification plugin as a base and to my surprise it even worked.
Right now I am just sending messages formatted in deadline as {message:message} as JSON to a post hook.

I would now want to step it up and send the message dict as json, before it has been formatted.

        Arguments:
            key (str): The message key
            job (Deadline.Jobs.Job): Job that got an error
            task (Deadline.Jobs.Task): Task that raised the error
            report (Deadline.Reports.Report): Error report


    message = self._get_message(key)
        if message:
            self._post(message.format(job=job,
                                      task=task,
                                      report=report))

I take it I can simply not call the message.format() function and then send the unformatted message? Is the message a “dict”. sorry I have 0 knowledge of python, mostly coding JS.

where can I find the documentation for all the properties in task report and job? I would love to know and only send the helpful ones.

PS
FYI I am calling a webhook in n8n a pretty cool software for automation. http://n8n.io/

1 Like

I haven’t looked at that Deadline+Slack plugin, but if it’s using the Standalone Python libraries, the docs are here.

If it uses the RESTful interface, the docs on that are here.

thanks!

I can only see the functions in the link you posted , but not whats in the properties, or am I missing something.

For example: this is copied from the slack config screen in deadline:

*Finsihed*: _{job.JobName}_
```Submitted by: {job.JobUserName}
Plug-in: {job.JobPlugin}
Priority: {job.JobPriority} (pool: {job.JobPool})
Framerange: {job.JobFrames}

Above I can see that job contains job.JobName JobUserName… etc, where is a complete list so I can browse those and see which wants I want to send to my webhook?

Where is a doc where I can see all of the properties a Deadline.Jobs.Job contains?

Ah, that would be because my two guesses were wrong. That’s an event plugin that uses the internal API, described here. Here’s the page on a Job object.

1 Like