[Beginner api] Creating Job instance

Discussion and Support of Deadline, the Render Management System
BlueLegend78
Posts: 8
Joined: Fri May 12, 2017 11:12 am

Re: [Beginner api] Creating Job instance

Postby BlueLegend78 » Tue May 16, 2017 12:47 pm

Thanks for all the help! I set up that so far. What I'm asking is when I open up /deadlineRepository/scripts the files in there will import in
From deadline.scripting import *


And I cant seem to find that in the api I installed

User avatar
MikeOwen
Posts: 3379
Joined: Thu Jul 19, 2007 5:00 am
Location: London
Contact:

Re: [Beginner api] Creating Job instance

Postby MikeOwen » Tue May 16, 2017 12:52 pm

No, this will not work. The plugins/scripts stored in the directories under the Deadline repo all (except the 'api' directory) require to be executed within the environment of Deadline and it's built-in "Python Scripting API", which is NOT the same as our offered "Standalone Python API". If you wish to use our scripts or Python modules (which technically aren't modules but rather namespaces anyway) such as:

Code: Select all

from Deadline.Scripting import *
from Deadline.Jobs import *


then you will need to execute your script/plugin/event, etc from within the context of the Deadline environment via one of our applications or via our command-line tool:

Code: Select all

./DeadlineCommand -ExecuteScript "/path/to/script.py"
Mike Owen
Developer
Thinkbox Software UK

BlueLegend78
Posts: 8
Joined: Fri May 12, 2017 11:12 am

Re: [Beginner api] Creating Job instance

Postby BlueLegend78 » Wed May 17, 2017 8:08 am

So right now our render farm is set up with Qube! and I am trying to set up Deadline as a possible replacement. In our farm engine, here are the qube! parameters we use.

Code: Select all

qb_job['id']
qb_job['name']         job_info["Name"]
qb_job['label']         job_info["Comment"] = "my comment"   
qb_job['priority']      job_info["Priority"] = 80
qb_job['cmdline']      job_info["Plugin"] ="CommandLine"
qb_job['package']
qb_job['cpus']
qb_job['env']         job_info["IncludeEnvironment"] = False
qb_job['reservations']
qb_job['prototype']      job_info["Plugin"] ="CommandLine"
qb_job['agenda']
qb_job['dependency']      job_info["JobDependencies"]=["5055005","5050505"]
qb_job['requirements']   job_info["RequiredAssets"] = ["5050545","545454"]
qb_job['cluster']         job_info["Region"] = "clusters"
qb_job['groups']         job_info["Group"] = "group1"
qb_job['hosts']           job_info["Whitelist"] = ["555555"]   
qb_job['mailaddress']      job_info["NotificationEmails"] ="testmail@mail.com"
qb_job['callbacks']      job_info['OnJobComplete']

Do i acheive the same in deadline? Would this be how I go about changing the Qube! variables(left) to their deadline equivalents(right)

User avatar
MikeOwen
Posts: 3379
Joined: Thu Jul 19, 2007 5:00 am
Location: London
Contact:

Re: [Beginner api] Creating Job instance

Postby MikeOwen » Wed May 17, 2017 8:53 am

Hey,

I recently finished up on a project to help another customer with the same questions. Do you want to submit a support ticket and we can continue the conversation there so we can provide more direct support if required? https://support.thinkboxsoftware.com/ or via email: support [@] thinkboxsoftware [dot] com

Cheers,
Mike
Mike Owen
Developer
Thinkbox Software UK

BlueLegend78
Posts: 8
Joined: Fri May 12, 2017 11:12 am

Re: [Beginner api] Creating Job instance

Postby BlueLegend78 » Wed May 17, 2017 9:17 am

sure thing! just submitted it.


Return to “Thinkbox Software - Deadline”

Who is online

Users browsing this forum: No registered users and 1 guest