The freezer.scheduler.scheduler_job Module

Copyright 2015 Hewlett-Packard

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class freezer.scheduler.scheduler_job.Job(scheduler, executable, job_doc)[source]

Bases: object

ABORTED_RESULT = 'aborted'
ABORT_EVENT = 'abort'
COMPLETED_STATUS = 'completed'
FAIL_RESULT = 'fail'
NO_EVENT = ''
REMOVED_STATUS = 'removed'
REMOVE_EVENT = 'remove'
RUNNING_STATUS = 'running'
SCHEDULED_STATUS = 'scheduled'
START_EVENT = 'start'
STOP_EVENT = 'stop'
STOP_STATUS = 'stop'
SUCCESS_RESULT = 'success'
TIME_NULL = -1
can_be_removed()[source]
contains_exec()[source]
static create(scheduler, executable, job_doc)[source]
end_session(result)[source]
event
execute()[source]
execute_job_action(job_action)[source]
finish()[source]
get_schedule_args()[source]
id
job_doc_status
kill()[source]
process_event(job_doc)[source]
remove()[source]
result
static save_action_to_file(action, f)[source]
schedule()[source]
schedule_cron_fields
schedule_date
schedule_end_date
schedule_interval
schedule_start_date
scheduled
session_id
session_tag
start_session()[source]
terminate()[source]
unschedule()[source]
update_job_schedule_doc(**kwargs)[source]

Updates the job_schedule section of the job doc with the provided keyword args. No checks about accepted key/values are being made here since they may vary in the future.

Parameters:kwargs – keyword args to add
Returns:None
upload_metadata(metadata_string)[source]
class freezer.scheduler.scheduler_job.RunningState[source]

Bases: object

static abort(job, doc)[source]
static remove(job)[source]
static start(job, doc)[source]
static stop(job, doc)[source]
class freezer.scheduler.scheduler_job.ScheduledState[source]

Bases: object

static abort(job, doc)[source]
static remove(job)[source]
static start(job, doc)[source]
static stop(job, doc)[source]
class freezer.scheduler.scheduler_job.StopState[source]

Bases: object

static abort(job, doc)[source]
static remove(job)[source]
static start(job, doc)[source]
static stop(job, doc)[source]