Making the website work without db.

This commit is contained in:
sergiotarxz 2023-07-28 22:38:22 +02:00
parent dbcb69cc5c
commit c93313e941

View File

@ -20,12 +20,17 @@ my $tracking;
my $iso8601 = DateTime::Format::ISO8601->new; my $iso8601 = DateTime::Format::ISO8601->new;
sub request { sub request {
shift; shift;
my $c = shift; eval {
my $app = $c->app; my $c = shift;
if (!defined $tracking) { my $app = $c->app;
$tracking = BurguillosInfo::Tracking->new($app); if (!defined $tracking) {
} $tracking = BurguillosInfo::Tracking->new($app);
$tracking->register_request($c); }
$tracking->register_request($c);
};
if ($@) {
say STDERR $@;
}
} }
sub stats { sub stats {