Sometimes we need Draft Event to re-generate a Quicktime for the job that was already completed.
The work around was to right-click the job and from right-click menu to choose “Requeue Job” command.
Then before the job gets picked up by a slave we right-click the job again and choose “Complete Job” command.
Trying to automate this two-steps process with Python:
selectedJobs = MonitorUtils.GetSelectedJobs()
for job in selectedJobs:
RepositoryUtils.RequeueJob(job)
RepositoryUtils.CompleteJob(job)
This approach requeues the Job (its status is switched to “Active”).
But the Job’s Status is not set to “Completed” with
RepositoryUtils.CompleteJob(job)
command.
I just tested this using the attached script file in Deadline 7.2.1.10 and Deadline 8.0.0.47 and both work just fine. You can double-check it’s working via the Console Panel (print messages) and also by right-click the job -> View Job History…
Thanks Mike,
I’ve tested it with Deadline 6.2. By some reason the Job gets re-queued but not Completed.
Instead of switching the Job’s Status from Completed-to-Requeued-back-to-Completed I wounder if it would be possible to simply trigger the Draft Event?
Simple right-click menu Python script would look something like this:
from Deadline.Scripting import *
def __main__():
selectedJobs = MonitorUtils.GetSelectedJobs()
for job in selectedJobs:
draftObject.OnJobFinished(job)
Since I have the Job object I can probably pass it along to Draft Event?
[code]"""
RequeueCompleteJob.py - Requeue and then Complete a job to force the Draft event plugin to execute
“”"
from System.IO import *
from System.Diagnostics import *
########################################################################
def main():
selectedJobs = MonitorUtils.GetSelectedJobs()
for job in selectedJobs: