class Beetle::Job

Overview

Defines a Job eligible to be executed by Beetle. Instances of this class are not created directly but rather by the Server object from the JSON payload associated with the /job request. The fields in the JSON payload are:

For example:

{
    "name": "charges_local",
    "host": "http://localhost:3001",
    "run_for_sec": 10,
    "tasks": [
        {
            "task_class": "BCaaS::ChargeTask",
            "weight": 1,
            "sleep_min_msec": 500,
            "sleep_max_msec": 1000
        }
    ]
}

Included Modules

Defined in:

beetle/job.cr

Constructors

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]