Huygens Remote Manager
  • Namespace
  • Class
  • Tree
  • Todo

Namespaces

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

Classes

  • DatabaseConnection
  • Fileserver
  • FileserverV2
  • HuygensTemplate
  • HuygensTools
  • Log
  • Mail
  • Nav
  • OmeroConnection
  • QueueManager
  • System
  • Util
  • UtilV2
  • Validator

Functions

  • fileButton

Class QueueManager

Creates Jobs from JobDescriptions and manages them in a priority queue.

Namespace: hrm
Package: hrm
Located at QueueManager.php

Methods summary

public
# __construct( )

QueueManager constructor.

QueueManager constructor.

public
# removeHuygensOutputFiles( hrm\job\JobDescription $desc, string $server_hostname )

If existing, delete debris from previously run jobs.

If existing, delete debris from previously run jobs.

Parameters

$desc
A JobDescription object.
$server_hostname
The server where the job will be run.

Todo

Move to Shell.php.
public true
# executeTemplate( hrm\job\Job $job )

Executes given Job.

Executes given Job.

Parameters

$job
A Job object.

Returns

true
if the Job could be executed, false otherwise.

Todo

Update templateName variable with templateName
public string
# copyImagesToServer( hrm\job\Job $job, string $server_hostname )

Copies the images needed by a given Job to the processing server.

Copies the images needed by a given Job to the processing server.

Parameters

$job
A Job object.
$server_hostname
Name of the server to which to copy the files.

Returns

string
The full path to which the files were copied.
public hrm\job\Job
# nextJobFromQueue( )

Returns the next Job in the queue.

Returns the next Job in the queue.

Returns

hrm\job\Job
the next Job in the queue.
public
# cleanUpFileServer( hrm\job\Job $job )

Deletes temporary Job files from the file server

Deletes temporary Job files from the file server

Parameters

$job
A Job object.
public
# restoreOwnership( string $username )

Sets ownership of the files in the user area to the user

Sets ownership of the files in the user area to the user

Parameters

$username

Name of the user (must be a valid linux user on the file server).

Todo

Is this still used?
public
# updateJobAndServerStatus( )

Updates the Job and server status.

Updates the Job and server status.

This methods kills all Jobs that are marked to be killed, checks whether Jobs are completed and create report files, write Parameter files,...

Todo

This method is a mess!
public string
# assembleJobLogFile( hrm\job\Job $job, string $startTime, string $logFile, string $errorFile )

Assembles the job log to be displayed in the file manager.

Assembles the job log to be displayed in the file manager.

The job log contains the HuCore output and error log and some additional information.

Parameters

$job
A Job object.
$startTime
Start time of the Job.
$logFile
Full path to the log file.
$errorFile
Full path to the errorlog file.

Returns

string
Job log to be displayed.
public
# notifySuccess( hrm\job\Job $job, string $startTime )

Sends an e-mail to the User notifying a successful Job

Sends an e-mail to the User notifying a successful Job

Parameters

$job
A Job object.
$startTime
Start time of the Job.
public
# notifyError( hrm\job\Job $job, string $startTime )

Sends an e-mail to the User and Admin notifying a failed Job.

Sends an e-mail to the User and Admin notifying a failed Job.

Parameters

$job
A Job object
$startTime
Start time of the Job.
public
# notifyPingError( string $name )

Sends an e-mail to the Admin notifying that a server could not be pinged.

Sends an e-mail to the Admin notifying that a server could not be pinged.

Parameters

$name
Name of the server that was (not) pinged.
public string
# getFreeServer( )

Report (and internally store) the name of a free server that can accept a Job.

Report (and internally store) the name of a free server that can accept a Job.

Returns

string
Name of a free server.
public
# stop( )

Inform the QueueManager that it should stop.

Inform the QueueManager that it should stop.

public boolean
# shallStop( )

Check (in the database) if the QueueManager shall stop (i.e. leave its main loop)

Check (in the database) if the QueueManager shall stop (i.e. leave its main loop)

Returns

boolean
True if the QueueManager shall stop.
public
# waitForDatabaseConnection( )

Waits until a DatabaseConnection could be established.

Waits until a DatabaseConnection could be established.

public
# initializeServers( )

Initialize the servers (mark the all as free).

Initialize the servers (mark the all as free).

public
# run( )

Runs the QueueManager.

Runs the QueueManager.

Huygens Remote Manager API documentation generated by ApiGen