NAME
App::MonM::Notifier::Agent - monotifier agent
VERSION
Version 1.00
SYNOPSIS
use App::MonM::Notifier::Agent;
my $agent = new App::MonM::Notifier::Agent(
ident => $j,
config => $c->config
);
DESCRIPTION
This module provides agent methods.
For internal use only
METHODS
- new
-
Constructor
my $agent = new App::MonM::Notifier::Agent( ident => $j, config => $c->config );
ident - number of the worker; config - CTK config structure
- status
-
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
- error
-
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
- store
-
my $store = $agent->store;
Returns current store object
- logger
-
my $logger = $agent->logger;
Returns current logger object
- getJob
-
my %data = $agent->getJob();
This method gets record as job from store for processing
- closeJob
-
$agent->closeJob($id, JBS_FAILED, 101, $errmsg);
This method marks record as closed job and sets error's code and message. Returns status
- postponeJob
-
$agent->postponeJob($id, $newpubdate);
This method postpone job on future. Sets the new pupdate integer value
- runJob
-
$agent->runJob(%$d);
This method runs all channels for job data and returns summary status
HISTORY
See CHANGES
file
DEPENDENCIES
TO DO
See TODO
file
BUGS
* none noted
SEE ALSO
AUTHOR
Sergey Lepenkov (Serz Minus) http://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
LICENSE
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