Scheduled Requeue

Is there a way to set up Deadline so that at a certain time in the morning, it requeues certain frames based on what pool the job is in?

So if it’s rendering a job from pool A, it will requeue itself, so that pool B, which is higher in the pool priority list, can make use of the slave instead of having to wait another hour until it is finished.

Seems like it would be quite difficult to do via command.

Thanks

No, there isn’t anything built into Deadline to do this. You could probably script up something that uses deadlinecommand to do this though. Here’s a script I whipped up that can help:

from System.Collections.Specialized import StringCollection
from Deadline.Scripting import *

def __main__():
	poolName = "test"
	
	slaveNames = RepositoryUtils.GetSlaveNames()
	for slaveName in slaveNames:
		ClientUtils.LogText( "checking slave %s" % slaveName )
		
		slaveInfo = RepositoryUtils.GetSlaveInfo( slaveName, False )
		if slaveInfo.SlaveCurrentJobPool == poolName:
			ClientUtils.LogText( "pool matches!" )
			
			jobId = slaveInfo.SlaveCurrentJobId
			if jobId != "":
				for taskId in slaveInfo.CurrentTaskIds.split( ',' ):
					args = StringCollection()
					args.Add( "RequeueJobTask" )
					args.Add( jobId )
					args.Add( taskId )
					ClientUtils.ExecuteCommand( args )

You could save this to a file called requeueTasks.py, and then run it using:

deadlinecommand.exe -ExescuteScript "requeueTasks.py"

You could then set this up as a scheduled task to run every morning at the same time.

Cheers,

  • Ryan

Sorry about the long reply time, and didn’t want to seem ungrateful.

Thanks for that Ryan!