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… ?
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?
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.