I have an event plugin that I want to use to modify the job department on submission and discovered that it’s not updating in the monitor.
[...]
def OnJobSubmitted(self, job):
header()
if job.JobUserName == "brett.bronson":
job.set_Department("Dev")
print job.JobDepartment
[...]
output from job reports:
[code]=======================================================
Log
PYTHON: [ INFO] --------------------------------------------------------------------------------
PYTHON: [ INFO] bbPipeline
PYTHON: [ INFO] --------------------------------------------------------------------------------
PYTHON: Dev
[/code]
It shows the department as set when printing job.JobDepartment in the reports, however, the Deadline monitor does not update with this set information.
I was, however, able to set a value and have the deadline monitor display it by running:
c:\Program Files\Thinkbox\Deadline6\bin>deadlinecommand.exe SetJobSetting 5339f260fd259d3394cad4da Department DEV
Set Department to DEV
The documentation shows:
5.2.3.5 string Deadline.Jobs.Job.JobDepartment [get], [set]
The department to which the job’s user belongs to.
job.JobDepartment is of type unicode, there’s no method for setting or getting so I’m confused by the [get], [set]. Nowhere else in the documentation stated where the set method was so I found it by doing:
for f in dir(job):
print f