AWS Thinkbox Discussion Forums

calling RepositoryUtils.RequeueTasks

The docs say the proper argumentation for this function is:
static void Deadline.Scripting.RepositoryUtils.RequeueTasks ( Job job, Task[] tasks )

But for some reason, passing in a job object and a list of integers (or list of strings as deadline expects it normally during a dep check) both fail…

list of strings:

2014-09-15 14:58:40: To be queued tasks: [‘16’, ‘17’]
2014-09-15 14:58:40: Traceback (most recent call last):
2014-09-15 14:58:40: File “DeadlineUI\UI\Commands\ScriptCommands.py”, line 88, in InnerExecute
2014-09-15 14:58:40: Exception: Python Error: TypeError : No method matches given arguments (Python.Runtime.PythonException)
2014-09-15 14:58:40: Stack Trace:
2014-09-15 14:58:40: File “none”, line 39, in main
2014-09-15 14:58:40: File “C:\svnTools\trunk\S2\exchange\software\managed\pythonScripts\site-packages\scl\deadline\scriptDependencyTest.py”, line 361, in queueJob
2014-09-15 14:58:40: RepositoryUtils.RequeueTasks(oJob, vQueueThese)
2014-09-15 14:58:40: at FranticX.Scripting.PythonNetScriptEngine.HandlePythonError(Exception e)
2014-09-15 14:58:40: at FranticX.Scripting.PythonNetScriptEngine.CallFunction(String functionName, PyObject[] args)
2014-09-15 14:58:40: at Deadline.Scripting.DeadlineScriptManager.CallFunction(String scopeName, String functionName)

list of ints (i convert to ints after the print ‘to be queued tasks’):

2014-09-15 15:06:39: To be queued tasks: [‘18’, ‘19’]
2014-09-15 15:06:39: Traceback (most recent call last):
2014-09-15 15:06:39: File “DeadlineUI\UI\Commands\ScriptCommands.py”, line 88, in InnerExecute
2014-09-15 15:06:39: Exception: Python Error: TypeError : No method matches given arguments (Python.Runtime.PythonException)
2014-09-15 15:06:39: Stack Trace:
2014-09-15 15:06:39: File “none”, line 39, in main
2014-09-15 15:06:39: File “C:\svnTools\trunk\S2\exchange\software\managed\pythonScripts\site-packages\scl\deadline\scriptDependencyTest.py”, line 364, in queueJob
2014-09-15 15:06:39: RepositoryUtils.RequeueTasks(oJob, vQueueThese)
2014-09-15 15:06:39: at FranticX.Scripting.PythonNetScriptEngine.HandlePythonError(Exception e)
2014-09-15 15:06:39: at FranticX.Scripting.PythonNetScriptEngine.CallFunction(String functionName, PyObject[] args)
2014-09-15 15:06:39: at Deadline.Scripting.DeadlineScriptManager.CallFunction(String scopeName, String functionName)

any ideas?

I see my problem… needed to pass in Task objects, not just the indices.

One sidenote, when queueing frames with either RequeueTasks or ReleasePendingTasks, no entries are made to the job log.

cheers,
laszlo

None of the script API functions currently write to the job history. There is a RepositoryUtils.AddJobHistoryEntry() function you can use to manually log stuff to the job’s history.

Cheers,
Ryan

Oh this is glorious thanks! I was actually about to ask for such a function for other reasons, completely missed that it exists already! Is this available via the command line as well?

It’s not available for the command line, so we’ll add that to the todo list!

Cheers,
Ryan

Privacy | Site terms | Cookie preferences