This module provides a Python API for interfacing with Apple’s Qmaster distributed transcode engine. It provides capabilities for fallback from the specified Qmaster cluster controller to local processing via “This Computer”, should the Qmaster cluster be down or unavailable. This module also provides timeout facilities to provide graceful fail operation in the event that a job submission hangs the Qmaster system.
Our main qmaster batch class, used to submit and monitor qmaster batches.
Parameters: |
|
---|
Returns the status of a running job.
Returns: | (str) – The job status |
---|
Possible Status | |
---|---|
Processing | |
Waiting | |
PostProcessing | |
Hold | |
Cancelled | |
Successful |
Returns last error
(very) Basic Logging Function, we’ll probably migrate to msg module
Returns an array of logs matching logLevel
Submits the currently provided batch to compressor/qmaster for transcoding
Raises : | qmaster.SourceFileError, qmaster.DestinationError, qmaster.QmasterSubmissionError, qmaster.ClusterNotFound, QmasterSubmissionTimeoutError |
---|
This method will submit a running job and will block until the job has completed successfully or failed entirely
Raises : | qmaster.SourceFileError, qmaster.DestinationError, qmaster.QmasterSubmissionError, qmaster.ClusterNotFound, qmaster.QmasterSubmissionTimeoutError, qmaster.QmasterJobCancelled, qmaster.QmasterJobFailed |
---|
Use the qmaster module to get the status of a currently running job.
>>> myBatch = qmaster.QmasterBatch(
batchID='B58B0883-3912-4109-8C8E-EB50C3F52C78',
cluster='FCS Cluster')
>>> myBatch.getStatus()
'Processing'
>>> myBatch.getStatus()
'Successful'
Submit a file to compress and wait exit when it finishes.
>>> myBatch = qmaster.QmasterBatch()
>>> myBatch.cluster='FCS Cluster'
>>> myBatch.compressorSettingFile='/Users/hunterbj/Desktop/myH.264.setting'
>>> myBatch.sourceFile = '/Users/hunterbj/Desktop/mymov.mov'
>>> myBatch.destinationFile = '/Users/hunterbj/Desktop/myfileout.mov'
>>> myBatch.submitBatchAndWait()