Skip to content

Write a Rodan job package

Ling-Xiao Yang edited this page Feb 10, 2015 · 24 revisions

The job packages reside in the folder /rodan/jobs/. A job vendor provides its directory under this folder, where multiple Rodan jobs are defined. A job vendor can define the resource types that are required for its jobs as well.

Describe a Rodan job

A Rodan job is defined by a class that inherits rodan.jobs.base.RodanTask. The class should define the following attributes as its description:

attribute description
name string a unique name within all the jobs provided by the vendor.
author string the author of the job.
description string
settings [JSON Schema](http://json-schema.org/)1 the validation schema that describes the requirements of the job settings.
enabled boolean
category string
interactive boolean indicates whether the job will pause at some point and wait for manual input.2
input_port_types list of Python dictionary
output_port_types list of Python dictionary

1 - At present, Rodan only supports a JSON object as the topmost structure of settings.

2 - It is only informative for the users. It does not affect whether the job will pause. The behaviour of the job is determined by the return value of its execution code.

For input_port_types and output_port_types, the following keys should be defined:

key description
name string
resource_types list of string OR lambda: string -> boolean describes all possible resource MIME-types. If provided with a lambda function, Rodan will automatically filter the matched resource types in its registry.
minimum number minimum requirement of the job. 0 indicates no minimum requirement.
maximum number maximum requirement of the job. 0 indicates no maximum requirement.

Describe Resource Types

A vendor can describe the required resource types through the file resource_types.yaml. It is a list of mappings, which include:

name description
mimetype string
description (optional) string
extension (optional) string the suggested extension of this resource type.
Clone this wiki locally