PYTHON JOB TYPE EXAMPLE Introduction The pyframe directory contains a frontend and backend for a Python job type execution pipeline. The job simulates the existing cmdrange job type by executing a simple command across a range of frame numbers. For example: jobsubmit.py -range 1-3 sleep QB_FRAME_NUMBER will run the following commands on one or more subjobs: sleep 1 sleep 2 sleep 3 Installation The pyframe directory should be copied into the $QBDIR/types directory on all worker hosts. Python also should be installed on all worker hosts, of course. The jobsubmit.py script found in the pyframe directory is the frontend for submitting the job to the backend, and can be installed anywhere in a user's path. This job type was tested in a Linux environment. If you plan to run this in Windows environment, you will need to remove the host.os requirement in jobsubmit.py. Description Jobsubmit.py is the frontend, responsible for assembling a job description for execution by the backend. If you wish to test using the bootstrap.py short circuit, you will want to use the --archive option to create a job archive. See "Bootstrap Short Circuit" below for more information Execute.py is the backend executable. The worker will spawn a proxy for each subjob slot. The proxy will launch the backend, and after execution will return a "complete" subjob state to the supervisor. Job.conf is used to configure the job type. Its defaults should be sufficient. Bootstrap Short Circuit The bootstrap.py is way to help the development by allowing both the frontend and backend to run on the same host without the need for a supervisor, hence the term "short-circuit." In order to take advantage of the bootstrapper, you will need to run it on an archive of the job itself. Therefore, if you plan to develop any job types of your own, you should include an option to create an archive file. There is a convenient API call provided for this purpose. The bootstrap.py just needs an archive file and the backend in order to execute the job. The whole process can be combined into a single pass by using the "--frontend" option to create the archive. The "--type" and "--base" options are provided to give more flexibilty in where the bootstrap.py may be located as part of the job type development workflow. Support These tools are provided "as-is," but if you have any questions, feel free to contact support@pipelinefx.com.