DOKK / manpages / debian 12 / tirex / Tirex::Manager.3pm.en
Tirex::Manager(3pm) User Contributed Perl Documentation Tirex::Manager(3pm)

Tirex::Manager - Rendering manager

 use Tirex::Manager;
 my $queue = Tirex::Queue->new();
 my $rm = Tirex::Manager->new( queue => $queue );

The rendering manager takes jobs from the queue and runs them. It takes into account how many parallel renderings are allowed, the priority of the jobs etc.

Create a new rendering manager. Parameters are:

 queue   the queue with the rendering requests (see Tirex::Queue)

$rm->add_bucket(name => $name, minprio => $minprio, maxproc => $maxproc, maxload => $maxload)

Creates and adds a bucket with the given config. It always keeps buckets sorted according to minprio.

Returns the created bucket or undef on error.

$rm->set_active_flag_on_bucket($active, $bucketname)

Returns true if successful, ie. the bucket did exists, false if unsuccessful.

Return socket where the rendering manager expects responses from the rendering backends. This should be added to select calls in main loop.

Runs as many jobs as there are in the queue (as long as the resources don't run out).

This will also check for timeouts on the jobs that are currently rendering.

Check whether there is a job that can be rendered and that there are enough resources and then render the job.

Returns

 undef if there is no job to run
 0     if there aren't enough resources
 1     if a job was started
 2     if a job was expired

Send a job to the rendering daemon.

This is called when a message comes back from the backend that a job was rendered.

Returns the job or undef if the job was not found.

Write statistics to log file.

Return status of the rendering manager.

Get system load by calling the 'uptime' command. This is called by get_load() if /proc/loadavg is not available.

Get current load on the machine. If /proc/loadavg is not readable for some reason, it always returns 0.

Tirex::Manager::Test

2023-04-11 perl v5.36.0