summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm5
-rw-r--r--lib/Travelynx/Model/Stations.pm5
-rw-r--r--lib/Travelynx/Model/Users.pm3
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index 8efbab2..1662787 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -1735,6 +1735,8 @@ sub compute_stats {
sub get_stats {
my ( $self, %opt ) = @_;
+ $self->{log}->debug("get_stats");
+
if ( $opt{cancelled} ) {
$self->{log}
->warn('get_journey_stats called with illegal option cancelled => 1');
@@ -1761,9 +1763,12 @@ sub get_stats {
)
)
{
+ $self->{log}->debug("got cached journey stats for $year/$month");
return $stats;
}
+ $self->{log}->debug("computing journey stats for $year/$month");
+
my $interval_start = DateTime->new(
time_zone => 'Europe/Berlin',
year => 2000,
diff --git a/lib/Travelynx/Model/Stations.pm b/lib/Travelynx/Model/Stations.pm
index 174b3b4..44618ac 100644
--- a/lib/Travelynx/Model/Stations.pm
+++ b/lib/Travelynx/Model/Stations.pm
@@ -100,7 +100,7 @@ sub get_backends {
$opt{db} //= $self->{pg}->db;
my $res = $opt{db}->select( 'backends',
- [ 'id', 'name', 'iris', 'hafas', 'dbris', 'motis' ] );
+ [ 'id', 'name', 'dbris', 'efa', 'hafas', 'iris', 'motis' ] );
my @ret;
while ( my $row = $res->hash ) {
@@ -109,9 +109,10 @@ sub get_backends {
{
id => $row->{id},
name => $row->{name},
- iris => $row->{iris},
dbris => $row->{dbris},
+ efa => $row->{efa},
hafas => $row->{hafas},
+ iris => $row->{iris},
motis => $row->{motis},
}
);
diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm
index 1c3692e..a552633 100644
--- a/lib/Travelynx/Model/Users.pm
+++ b/lib/Travelynx/Model/Users.pm
@@ -418,7 +418,7 @@ sub get {
. 'extract(epoch from registered_at) as registered_at_ts, '
. 'extract(epoch from last_seen) as last_seen_ts, '
. 'extract(epoch from deletion_requested) as deletion_requested_ts, '
- . 'backend_id, backend_name, hafas, dbris, motis',
+ . 'backend_id, backend_name, dbris, efa, hafas, motis',
{ id => $uid }
)->hash;
if ($user) {
@@ -458,6 +458,7 @@ sub get {
backend_id => $user->{backend_id},
backend_name => $user->{backend_name},
backend_dbris => $user->{dbris},
+ backend_efa => $user->{efa},
backend_hafas => $user->{hafas},
backend_motis => $user->{motis},
};