Huygens Remote Manager
  • Namespace
  • Class
  • Tree
  • Todo

Namespaces

  • hrm
    • job
    • param
      • base
    • setting
      • base
    • shell
    • stats
    • user
      • proxy

Classes

  • Job
  • JobDescription
  • JobQueue

Class JobQueue

Manages the queue of deconvolution Jobs.

Namespace: hrm\job
Package: hrm
Located at job/JobQueue.php

Methods summary

public
# __construct( )

JobQueue constructor.

JobQueue constructor.

public string
# timestampNowString( )

Return the timestamp of current time.

Return the timestamp of current time.

Returns

string
Timestamp of current time.
public array
# availableServer( )

Get names of all processing servers (independent of their status).

Get names of all processing servers (independent of their status).

Returns

array
Array of server names.
public array
# getContents( )

Returns all jobs from the queue, both compound and simple, and the associated file names, ordered by priority.

Returns all jobs from the queue, both compound and simple, and the associated file names, ordered by priority.

Returns

array
All jobs.
public array
# getJobFilesFor( string $id )

Returns all file names associated to a job with given id.

Returns all file names associated to a job with given id.

Parameters

$id
Job id.

Returns

array
Array of file names.
public boolean
# queueJob( hrm\job\JobDescription $jobDescription )

Adds a Job for a JobDescription to the queue.

Adds a Job for a JobDescription to the queue.

Parameters

$jobDescription
A JobDescription object.

Returns

boolean
True if queuing the Job succeeded, false otherwise.
public boolean
# startJob( hrm\job\Job $job )

Starts a Job.

Starts a Job.

Parameters

$job
A Job object.

Returns

boolean
True if starting the Job succeeded, false otherwise.
public hrm\job\JobDescription|null
# getNextJobDescription( )

Gets the JobDescription for the next Job id from the database.

Gets the JobDescription for the next Job id from the database.

Returns

hrm\job\JobDescription|null
A loaded JobDescription or null if no more jobs are in the queue.
public array
# getCompoundJobs( )

Gets the compound jobs from the queue.

Gets the compound jobs from the queue.

Returns

array
Array of JobDescriptions for compound Jobs.
public boolean
# removeJob( hrm\job\JobDescription $jobDescription )

Removes the Job that correspond o a given JobDescription.

Removes the Job that correspond o a given JobDescription.

Parameters

$jobDescription
A JobDescription object.

Returns

boolean
True if Job removal was successful, false otherwise.
public boolean
# markJobsAsRemoved( array $ids, string $owner, boolean $isAdmin = false )

Marks Jobs with given ids as 'broken' (i.e. to be removed).

Marks Jobs with given ids as 'broken' (i.e. to be removed).

Parameters

$ids
Job ids.
$owner
Name of the user who owns the Job.
$isAdmin
True if the owner is an admin (default = false).

Returns

boolean
True if Job the job could be marked, false otherwise.
public boolean
# killJobs( array|string $ids )

Kills Jobs with given id.

Kills Jobs with given id.

Parameters

$ids
Job ids (string or array of strings).

Returns

boolean
True if all Jobs were killed, false otherwise.
public boolean
# killMarkedJobs( )

Kills marked Jobs (i.e. those with status 'kill').

Kills marked Jobs (i.e. those with status 'kill').

Returns

boolean
True if all marked Jobs were killed, false otherwise.
public boolean
# removeMarkedJobs( )

Remove marked Jobs from the Queue (i.e. those 'kill'ed).

Remove marked Jobs from the Queue (i.e. those 'kill'ed).

Returns

boolean
True if all marked Jobs were removed, false otherwise.
public boolean
# removeJobWithId( string $id )

Remove Job with given id from the database.

Remove Job with given id from the database.

Parameters

$id
Job id.

Returns

boolean
True if the Job were removed, false otherwise.
public boolean
# stopJob( hrm\job\Job $job )

Stops and removes a Job from the Queue and the database.

Stops and removes a Job from the Queue and the database.

Parameters

$job
Job object.

Returns

boolean
True if the Job were removed, false otherwise.
public array
# runningJobs( )

Returns all running jobs from the database.

Returns all running jobs from the database.

Returns

array
Array of Job objects.
public string
# startTime( hrm\job\Job $job )

Returns the start time of a given Job object.

Returns the start time of a given Job object.

Parameters

$job
Job object.

Returns

string
Start time.
public ADORecordSet_empty|ADORecordSet_mysql|False
# updateEstimatedEndTime( string $id, string $date )

Updates the estimated end time in the database.

Updates the estimated end time in the database.

Parameters

$id
Job id.
$date
Estimated end time (string).

Returns

ADORecordSet_empty|ADORecordSet_mysql|False
Query result.
public ADORecordSet_empty|ADORecordSet_mysql|False
# pauseJob( hrm\job\JobDescription $jobDescription )

Pauses the Job described by the given JobDescription.

Pauses the Job described by the given JobDescription.

Parameters

$jobDescription
JobDescription object.

Returns

ADORecordSet_empty|ADORecordSet_mysql|False
Query result.
public ADORecordSet_empty|ADORecordSet_mysql|False
# restartPausedJobs( )

Restarts all paused Jobs.

Restarts all paused Jobs.

Returns

ADORecordSet_empty|ADORecordSet_mysql|False
Query result.
public boolean
# isServerBusy( string $name )

Checks whether server is busy.

Checks whether server is busy.

Parameters

$name
Name of the server.

Returns

boolean
True if the server is busy, false otherwise.
public boolean
# isLocked( )

Checks whether the QueueManager is locked.

Checks whether the QueueManager is locked.

Returns

boolean
True if the QueueManager is locked, false otherwise.
public ADORecordSet_empty|ADORecordSet_mysql|False
# lock( )

Locks the QueueManager.

Locks the QueueManager.

Returns

ADORecordSet_empty|ADORecordSet_mysql|False
Query result.
public ADORecordSet_empty|ADORecordSet_mysql|False
# unlock( )

Unlocks the QueueManager.

Unlocks the QueueManager.

Returns

ADORecordSet_empty|ADORecordSet_mysql|False
Query result.
Huygens Remote Manager API documentation generated by ApiGen