You will need the following CPAN packages:
- sudo cpanm EV Mojolicious Mojo::IOLoop::ForkCall JSON JSON::XS
+ sudo cpanm EV Mojolicious Sereal JSON JSON::XS
# just in case it's missing
sudo apt-get install top
+
+Please make sure that, if you insist on using operating system packages, that your Mojolicious is
+at least version 7.40. Mojo::IOLoop::ForkCall is NOT LONGER IN USE!
+
Login as the sysop user.
Edit your /spider/local/DXVars.pm so that the bottom of the file is changed from something like:
my $line = 0;
my @out;
- dbg("cron: reading $fn\n") if isdbg('cron');
+ dbg("DXCron::cread reading $fn\n") if isdbg('cron');
open($fh, $fn) or confess("cron: can't open $fn $!");
while (<$fh>) {
$line++;
if (!$err) {
$ref->{cmd} = $cmd;
push @out, $ref;
- dbg("cron: adding $_\n") if isdbg('cron');
+ dbg("DXCron::cread: adding $_\n") if isdbg('cron');
} else {
- dbg("cron: error on line $line '$_'\n") if isdbg('cron');
+ dbg("DXCron::cread: error on line $line '$_'\n") if isdbg('cron');
}
}
close($fh);
{
my $line = shift;
- dbg("spawn_cmd run: $line") if isdbg('cron');
+ dbg("DXCron::spawn_cmd run: $line") if isdbg('cron');
my $fc = Mojo::IOLoop::Subprocess->new();
$fc->run(
sub {
sub {
my ($fc, $err, @res) = @_;
if ($err) {
- my $s = "spawn_cmd: error $err";
+ my $s = "DXCron::spawn_cmd: error $err";
dbg($s);
}
for (@res) {
chomp;
- dbg("spawn_cmd: $_") if isdbg("cron");
+ dbg("DXCron::spawn_cmd: $_") if isdbg("cron");
}
}
);
{
my $line = shift;
my @in = $main::me->run_cmd($line);
- dbg("cmd run: $line") if isdbg('cron');
+ dbg("DXCron::run_cmd: $line") if isdbg('cron');
for (@in) {
s/\s*$//og;
- dbg("cmd out: $_") if isdbg('cron');
+ dbg("DXCron::cmd out: $_") if isdbg('cron');
}
}