App-madeye

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

lib/App/MadEye/Plugin/Check/User.pm
lib/App/MadEye/Plugin/Notify/Debug.pm
lib/App/MadEye/Plugin/Notify/Email.pm
lib/App/MadEye/Plugin/Notify/IKC.pm
lib/App/MadEye/Plugin/Notify/IMKayac.pm
lib/App/MadEye/Plugin/Notify/Ikachan.pm
lib/App/MadEye/Plugin/Notify/XMPP.pm
lib/App/MadEye/Plugin/Worker/Gearman.pm
lib/App/MadEye/Plugin/Worker/Simple.pm
lib/App/MadEye/Rule.pm
lib/App/MadEye/Rule/DateTimeCron.pm
lib/App/MadEye/Rule/Interval.pm
lib/App/MadEye/Rule/Retry.pm
lib/App/MadEye/Util.pm
minil.toml
script/madeye.pl
t/00_compile.t
t/100_bugs/001_autoload_worker_simple.t
t/100_bugs/002_results.t
t/perlcriticrc
xt/02_perlcritic.t

META.json  view on Meta::CPAN

      },
      "runtime" : {
         "requires" : {
            "CPAN::Meta" : "0",
            "CPAN::Meta::Prereqs" : "0",
            "Cache::FileCache" : "0",
            "Cache::Memcached::Fast" : "0",
            "Class::Component" : "0.17",
            "Class::Component::Plugin" : "0",
            "DBI" : "0",
            "DateTime" : "0",
            "DateTime::Event::Cron" : "0",
            "Digest::SHA1" : "0",
            "Encode" : "0",
            "Furl" : "0",
            "Gearman::Client" : "0",
            "Gearman::Util" : "0",
            "Gearman::Worker" : "0",
            "Getopt::Long" : "0",
            "IO::Select" : "0",
            "IO::Socket::INET" : "0",
            "IO::Socket::SSL" : "0",

META.json  view on Meta::CPAN

      },
      "App::MadEye::Plugin::Worker::Gearman" : {
         "file" : "lib/App/MadEye/Plugin/Worker/Gearman.pm"
      },
      "App::MadEye::Plugin::Worker::Simple" : {
         "file" : "lib/App/MadEye/Plugin/Worker/Simple.pm"
      },
      "App::MadEye::Rule" : {
         "file" : "lib/App/MadEye/Rule.pm"
      },
      "App::MadEye::Rule::DateTimeCron" : {
         "file" : "lib/App/MadEye/Rule/DateTimeCron.pm"
      },
      "App::MadEye::Rule::Interval" : {
         "file" : "lib/App/MadEye/Rule/Interval.pm"
      },
      "App::MadEye::Rule::Retry" : {
         "file" : "lib/App/MadEye/Rule/Retry.pm"
      },
      "App::MadEye::Util" : {
         "file" : "lib/App/MadEye/Util.pm"
      }

META.yml  view on Meta::CPAN

  App::MadEye::Plugin::Notify::Ikachan:
    file: lib/App/MadEye/Plugin/Notify/Ikachan.pm
  App::MadEye::Plugin::Notify::XMPP:
    file: lib/App/MadEye/Plugin/Notify/XMPP.pm
  App::MadEye::Plugin::Worker::Gearman:
    file: lib/App/MadEye/Plugin/Worker/Gearman.pm
  App::MadEye::Plugin::Worker::Simple:
    file: lib/App/MadEye/Plugin/Worker/Simple.pm
  App::MadEye::Rule:
    file: lib/App/MadEye/Rule.pm
  App::MadEye::Rule::DateTimeCron:
    file: lib/App/MadEye/Rule/DateTimeCron.pm
  App::MadEye::Rule::Interval:
    file: lib/App/MadEye/Rule/Interval.pm
  App::MadEye::Rule::Retry:
    file: lib/App/MadEye/Rule/Retry.pm
  App::MadEye::Util:
    file: lib/App/MadEye/Util.pm
requires:
  CPAN::Meta: 0
  CPAN::Meta::Prereqs: 0
  Cache::FileCache: 0
  Cache::Memcached::Fast: 0
  Class::Component: 0.17
  Class::Component::Plugin: 0
  DBI: 0
  DateTime: 0
  DateTime::Event::Cron: 0
  Digest::SHA1: 0
  Encode: 0
  Furl: 0
  Gearman::Client: 0
  Gearman::Util: 0
  Gearman::Worker: 0
  Getopt::Long: 0
  IO::Select: 0
  IO::Socket::INET: 0
  IO::Socket::SSL: 0

config.yaml.sample  view on Meta::CPAN

#      - ftp.ring.gr.jp
#      - ftp.ring.gr.jp
#      - ring.shibaura-it.ac.jp
#     message: FTP server raady.
#   rule:
#     - module: Retry
#       config:
#         expire_time: 30
#         cache_root: /tmp/foo

#     - module: DateTimeCron
#       config:
#         crontab: "* 16 * * *"
#         type: ignore

# - module: Agent::HTTP
#   config:
#     timeout: 6
#     target:
#      - http://livedoor.com/
#      - http://ljkdlsjaflfvedoor.com/

cpanfile  view on Meta::CPAN

requires 'List::Util';
requires 'Log::Dispatch';
requires 'Net::SNMP';

requires 'CPAN::Meta';
requires 'CPAN::Meta::Prereqs';
requires 'Cache::FileCache';
requires 'Cache::Memcached::Fast';
requires 'Class::Component::Plugin';
requires 'DBI';
requires 'DateTime';
requires 'DateTime::Event::Cron';
requires 'Digest::SHA1';
requires 'Encode';
requires 'Gearman::Client';
requires 'Gearman::Util';
requires 'Gearman::Worker';
requires 'Getopt::Long';
requires 'LWP::UserAgent';
requires 'MIME::Lite';
requires 'MogileFS::Admin';
requires 'Net::DNS';

lib/App/MadEye/Plugin/Notify/Email.pm  view on Meta::CPAN

package App::MadEye::Plugin::Notify::Email;
use strict;
use warnings;
use base qw/App::MadEye::Plugin::Base/;
use Params::Validate;
use MIME::Lite;
use DateTime;

sub notify : Hook {
    my ($self, $context, $args) = @_;

    my $conf = $self->{config}->{config};
    my $subject   = $conf->{subject} || '%s alert !!!';
    my $from_addr = $conf->{from_addr} or die "missing from_addr";
    my $to_addr   = $conf->{to_addr} or die "missing to_addr";

    while (my ($plugin, $results) = each %$args) {

lib/App/MadEye/Plugin/Notify/IMKayac.pm  view on Meta::CPAN

package App::MadEye::Plugin::Notify::IMKayac;
use strict;
use warnings;
use base qw/App::MadEye::Plugin::Base/;
use Params::Validate;
use MIME::Lite;
use DateTime;
use LWP::UserAgent;
use Digest::SHA1;

sub notify : Hook {
    my ($self, $context, $args) = @_;

    my $conf = $self->{config}->{config};
    my $username   = $conf->{username} or die "missing username";

    while (my ($plugin, $results) = each %$args) {

lib/App/MadEye/Rule/DateTimeCron.pm  view on Meta::CPAN

package App::MadEye::Rule::DateTimeCron;
use strict;
use warnings;
use base qw/App::MadEye::Rule/;

use DateTime;
use DateTime::Event::Cron;

sub dispatch {
    my ($self, $context, $args) = @_;

    my $crontab = $self->config->{crontab} or die "missing crontab";

    my $cron = DateTime::Event::Cron->new_from_cron( cron => $crontab );
    my $now = DateTime->now(time_zone => 'local')->set_second(0);
    return $cron->valid($now);
}

1;



( run in 0.286 second using v1.01-cache-2.11-cpan-05444aca049 )