On this page
Overview
How to
Custom Resources
Overview
Resources are things required by certain jobs to run, such as Houdini licenses and Mantra Render licenses. You can specify the resources available on clients so HQueue can properly schedule jobs that require certain resources.
HQueue will only schedule jobs requiring a license if there is at least one unused license available, or if another job can be run on a machine that is already using a license. (Houdini and Render licenses are a “per machine resource”. That is, the licenses are consumed per machine rather than per job.)
You can register custom resources of your own to guide scheduling of jobs that require other types of external resources, such as third-party licenses, database locks, and so on.
How to
In a web browser, connect to the HQueue server (http://hostname:5000/
). Hover over the menu icon, then click Resources.
The Resources page shows a summary of the available resources and resources in use.
To… | Do this |
---|---|
Change the number of licenses available to HQueue | If you decrease the number of a licenses available, make sure the new amount is not less than the number of licenses currently in use.
|
Custom Resources
Custom resources can be per machine or per job.
Per machine
A resource that is used by a single machine, and can be shared across all jobs running on that machine. For example, a Houdini license is used by a workstation, and then you can run multiple instances of Houdini on that workstation.
Per job
A resource that is consumed by a single job. For example, a database connection can only be used by one job at a time.
To… | Do this |
---|---|
Create and a custom resource |
For example, you might have a set of jobs that connect to a database and you want to limit the number of concurrent connections. Create a custom per job resource to represent the connections, name it Then when you submit jobs requiring the connection, add a |
Edit a custom resource |
|
Submitting jobs that require custom resources | When you submit custom jobs using the /hqueue/XML/RPC interface, you can specify that the job requires custom resources.
In the job specification, add a job_spec = { "name": "Hello World", "shell": "bash", "command": 'echo "Hello World"' "resources": {"db_connection": 1} } (See job properties for more information about the job specification.) |