AWS Thinkbox Discussion Forums

Standalone API job filters

Hi,

I did ask this in some other thread before but the question probably got lost in the main subject of the thread so I prefer to post a proper question.

We are making some kind of auto report system to inform users about their jobs on the farm on request. We are currently using the standalone API to requests the job list to the farm this way :

[code]from Deadline.DeadlineConnect import DeadlineCon as Connect
con = Connect(serverIP, serverPort)

jobs = con.Jobs.GetJobs()
user = ‘bob’

for job in jobs:
if job[‘Props’][‘User’] == user:
print job[/code]

Looking through the functions in repository/api/python/Deadline, I don’t see a way where we can filter the jobs list from the request directly rather than parsing through the jobs.

Is the standalone only meant to report the farm database in its entirety ? I’m worried to have to parse through a huge amount of jobs. It is possible that I misunderstood the purpose of the standalone API and there might be other Python libraries that I can use to filter by user/status/date/etc… ?

Thanks for reading !
Cheers
Chris

Currently, we only provide the ability to filter by job state(s):
docs.thinkboxsoftware.com/produc … 8dfaf29f43

so, this would need to be logged as a RFE. Before I do that, could you highlight what properties you would need/want to filter against for your use case?

By way of a comparsion, so that others know about this, we do currently have these CLI options available via ./DeadlineCommand:

[code]GetJobsFilterIniAnd
Display jobs that fulfill all the specified filters, in an ini format.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…

GetJobsFilterAnd
Display jobs that fulfill all the specified filters.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…

GetJobIdsFilter
Display job Ids for jobs that fulfill the specified filters.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…

GetJobIdsFilterAnd
Display jobs that fulfill all the specified filters.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…

GetJobsFilterIni
Display jobs that fulfill the specified filters, in an ini format.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…

GetJobsFilter
Display jobs that fulfill the specified filters.
[Filter 1] A filter, in the form of <Setting=Value>
[…] Additional filters…[/code]

I’m guessing you would want something generic like this as well?

Hi Mike,

thanks for your answer.

Indeed there is at least GetJobsInState, I was searching for filter or user and missed this one.

I think it would be great to have this kind of filters :

  • “if job/batch name contains” or “if job/batch name is”
  • by plugin
  • by submit date (currently the date returned by standalone API is not easy to filter, would love some unix timestamp)
  • by user (single or multiple)
  • then by custom arguments (Extra Info x)

That would be really helpful !
Thanks !
Chris

Coolio. Now logged as a RFE for you. I actually forgot we already have the same request but for the RESTful http API which of course the Standalone Python API is a wrapper around, so hopefully both will get done at the same time.

Hey Mike - has there been any advance on this feature? Is the RFE ticket in a public-facing tracking system?

Thanks

DJM

Privacy | Site terms | Cookie preferences