Moving the bot out of the main app.
This commit is contained in:
parent
42dc2fb56e
commit
494e89efa1
@ -60,11 +60,7 @@ sub startup ($self) {
|
||||
my $pidfile = path('/run/gtsrssapi.pid');
|
||||
my $gts_bot_pid = path('last_pid_started_gts_bot');
|
||||
if (-f $pidfile) {
|
||||
my $pidfile_content = $pidfile->slurp;
|
||||
if (-f $gts_bot_pid && $pidfile_content eq $gts_bot_pid->slurp) {
|
||||
return;
|
||||
}
|
||||
$gts_bot_pid->spew($pidfile_content);
|
||||
return;
|
||||
}
|
||||
$self->start_gts_bot;
|
||||
}
|
||||
|
12
script/gtsrssapi_bot.pl
Normal file
12
script/gtsrssapi_bot.pl
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use v5.34.1;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Mojo::File qw(curfile);
|
||||
use lib curfile->dirname->sibling('lib')->to_string;
|
||||
use GTSRSSApi;
|
||||
|
||||
GTSRSSApi->new->start_gts_bot;
|
||||
Mojo::IOLoop->start;
|
Loading…
Reference in New Issue
Block a user