Jobs

Jobs represent encoding tasks (current and completed).

class hdcloud.JobManager(api)
all(page=1)

Get a list of all jobs ever created. Paginated.

Parameter:page – Page number
Return type:list of Job instances.
current(page=1)

Get a list of currently running jobs. Paginated.

Parameter:page – Page number
Return type:list of Job instances.
completed(page=1)

Get a list of completed jobs. Paginated.

Parameter:page – Page number
Return type:list of Job instances.
failed(page=1)

Get a list of all failed jobs. Paginated.

Parameter:page – Page number
Return type:list of Job instances.
get(id)

Look up a job by ID.

Parameter:id – The job ID
Return type:A Job instance.
create(source, destination, files, profiles, priority=5, use_file_cache=True, remote_id=None, callback_url=None)

Kick off a new encoding task

Parameters:
  • source – The Store containing the source file.
  • destination – The Store to store the output file(s)
  • files – A list of filenames in the source store to encode.
  • profiles – A list of Profile for encoding.
  • priority – Integer, 1-10; higher numbers are higher priorities.
  • use_file_cache – Cache the source file in HD Cloud’s cache?
  • remote_id – An arbitrary string identifying the job.
  • callback_url – A webhook that will get POSTed to when the job completes.
Return type:

a list of Job instances that have been kicked off.

frames(obj, page=1)

Get a list of captured frames from a job.

Parameters:
  • page – Page number.
  • obj – The Job, or its ID.
Return type:

a list of filenames.

delete(obj)
Delete (i.e. cancel) a job.
destroy_bulk(objs)

Delete (i.e. cancel) a bunch of jobs.

Parameter:objs – List of Job instances, or their IDs.
class hdcloud.Job(manager, info)

An encoding task.

bitrate
complete
current_progress
current_status
current_step
encoded_filename
encoding_profile_id
id
remote_id
resolution
source_filename
status_url
frames(page=1)

Get a list of captured frames from a job.

Parameter:page – Page number.
Return type:a list of filenames.
delete()
Delete (i.e. cancel) this job.

Previous topic

Python bindings to the HDCloud API

Next topic

Encoding profiles

This Page