Trees | Indices | Help |
|
---|
|
Queue used to manage the jobs.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
(list, list) |
|
||
|
|||
|
|||
list of int |
|
||
_QueuedJob or None |
|
||
_QueuedJob or None |
|
||
_QueuedJob or None |
|
||
|
|||
|
|||
_QueuedJob |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
tuple (job info, log entries) |
|
||
|
|||
|
|||
|
|||
int |
|
||
bool |
|
||
|
|||
|
|||
|
|||
list |
|
||
bool |
|
||
bool |
|
||
|
|||
Inherited from |
|
|||
list |
|
|
|||
|
|||
str |
|
||
str |
|
||
list |
|
||
|
|||
tuple; (boolean, string or list) |
|
|
|||
Inherited from |
|
Constructor for JobQueue. The constructor will initialize the job queue object and then start loading the current jobs from disk, either for starting them (if they were queue) or for aborting them (if they were already running).
|
Loads the whole job queue and resumes unfinished jobs. This function needs the lock here because WorkerPool.AddTask() may start a job while we're still doing our work.
|
Register a new node with the queue.
|
Callback called when removing nodes from the cluster.
|
Verifies the status of an RPC call. Since we aim to keep consistency should this node (the current master) fail, we will log errors if our rpc fail, and especially log the case when more than half of the nodes fails.
|
Helper for returning the node name/ip list.
|
Writes a file locally and then replicates it to all nodes. This function will replace the contents of a file on the local node and then replicate it to all the other nodes we have.
|
Renames a file locally and then replicate the change. This function will rename a file in the local queue directory and then replicate this rename to all the other nodes we have.
|
Generates a new job identifier. Job identifiers are unique during the lifetime of a cluster.
|
Returns the job file for a given job id.
|
Returns the archived job file for a give job id.
|
Build list of directories containing job files.
|
Return all known job IDs. The method only looks at disk because it's a requirement that all jobs are present on disk (so in the _memcache we don't have any extra IDs).
|
Loads a job from the disk or memory. Given a job id, this will return the cached job object if existing, or try to load the job from the disk. If loading from disk, it will also add the job to the cache.
|
Load the given job file from disk. Given a job file, read, load and restore it in a _QueuedJob format.
|
Load the given job file from disk. Given a job file, read, load and restore it in a _QueuedJob format. In case of error reading the job, it gets returned as None, and the exception is logged.
|
Sets the drain flag for the queue.
|
Create and store a new job. This enters the job into our job queue and also puts it on the new queue, in order for it to be picked up by the queue processors.
|
Create and store a new job.
See Also: _SubmitJobUnlocked |
Forcefully create and store a new job. Do so, even if the job queue is drained.
See Also: _SubmitJobUnlocked |
Create and store multiple jobs.
See Also: _SubmitJobUnlocked |
Resolves relative job IDs in dependencies.
|
Create and store multiple jobs. See Also: _SubmitJobUnlocked |
Helper function to add jobs to worker pool's queue.
|
Helper function to add jobs to worker pool's queue.
|
Gets the status of a job for dependencies.
|
Update a job's on disk storage. After a job has been modified, this function needs to be called in order to write the changes to disk and replicate them to the other nodes.
|
Waits for changes in a job.
|
Cancels a job. This will only succeed if the job has not started yet.
|
Changes a job's priority.
|
Modifies a job.
|
Archives jobs.
|
Archives a job. This is just a wrapper over _ArchiveJobsUnlocked.
|
Archives all jobs based on age. The method will archive all jobs which are older than the age parameter. For jobs that don't have an end timestamp, the start timestamp will be considered. The special '-1' age will cause archival of all jobs (that are not running or queued).
|
Returns a list of jobs in queue.
|
Returns a list of jobs in queue.
|
Prepare to stop the job queue. Disables execution of jobs in the workerpool and returns whether there
are any jobs currently running. If the latter is the case, the job queue
is not yet ready for shutdown. Once this function returns
Once this function has been called no new job submissions will be accepted (see _RequireNonDrainedQueue).
|
Returns whether jobs are accepted. Once PrepareShutdown has been called, no new jobs are accepted and the queue is shutting down.
|
Stops the job queue. This shutdowns all the worker threads an closes the queue.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jan 7 16:23:35 2016 | http://epydoc.sourceforge.net |