App::MonM::Notifier::Agent - monotifier agent
Version 1.00
use App::MonM::Notifier::Agent; my $agent = new App::MonM::Notifier::Agent( ident => $j, config => $c->config );
This module provides agent methods.
For internal use only
Constructor
my $agent = new App::MonM::Notifier::Agent( ident => $j, config => $c->config );
ident - number of the worker; config - CTK config structure
if ($agent->status) { # OK } else { # ERROR }
Returns object's status. 1 - OK, 0 - ERROR
my $status = $agent->status( 1 );
Sets new status and returns it
my $error = $agent->error; my $status = $agent->error( "error text" );
Returns error string if no arguments. Sets error string also sets status to false (if error string is not false) or to true (if error string is false) and returns this status
my $store = $agent->store;
Returns current store object
my $logger = $agent->logger;
Returns current logger object
my %data = $agent->getJob();
This method gets record as job from store for processing
$agent->closeJob($id, JBS_FAILED, 101, $errmsg);
This method marks record as closed job and sets error's code and message. Returns status
$agent->postponeJob($id, $newpubdate);
This method postpone job on future. Sets the new pupdate integer value
$agent->runJob(%$d);
This method runs all channels for job data and returns summary status
See CHANGES file
CHANGES
CTK
See TODO file
TODO
* none noted
App::MonM::Notifier
Sergey Lepenkov (Serz Minus) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE file
LICENSE
To install App::MonM::Notifier, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MonM::Notifier
CPAN shell
perl -MCPAN -e shell install App::MonM::Notifier
For more information on module installation, please visit the detailed CPAN module installation guide.