NAME
Disbatch::QueueBalance
VERSION
version 4.103
SYNOPSIS
my
$qb
= Disbatch::QueueBalance->new(
$config_file
);
# where $config_file is the same as for Disbatch
$qb
->update();
Subroutines
- new($config_file)
-
Parameters: path to Disbatch config file
Sets up QueueBalance. Dies if QueueBalance is not configured or not enabled.
- status($status, $message)
-
Parameters: status string (should be
OK
,WARNING
, orCRITICAL
), message for statusReturns
update_one
result, but is ignored. - update
-
Parameters: none
Updates maxthreads for all queues, for all clients.
Returns nothing meaningful. Sets status to
CRITICAL
and dies if thebalance
collection is misconfigured. - max_tasks($max_threads_entries)
-
Parameters:
HASH
where keys are of formD H:M
and values are integers.Determines the max number of threads allowed for the current day and time.
Returns: integer for current max_threads allowed
day of week 0-6 (0 is sunday), or *
for
all
unless
an explicit rule overrides it
hour 0-23
minute 0-59
AUTHORS
Ashley Willis <awillis@synacor.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015, 2019 by Ashley Willis.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004