diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-21 20:48:53 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-21 20:48:53 +0200 |
commit | da87e97a0b954860e0a53b8a0f475580d44ad73d (patch) | |
tree | 3626df8b8792df43fcb0edf266059f70fbb92573 /lib/Travelynx/Command/work.pm | |
parent | ca2226b9238ac2159d0001a071edf33915f062ae (diff) |
Add bare-bones support for manual checkins (still bound to a specific backend)
Extension opportunities (maybe, eventually)
* provide datetimes of intermediate stops
* provide an API for real-time data updates
* look up stops that travelynx does not yet know about rather than rejecting
them outright
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
-rw-r--r-- | lib/Travelynx/Command/work.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 60417b1..1bc4f53 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -53,6 +53,23 @@ sub run { my $arr = $entry->{arr_eva}; my $train_id = $entry->{train_id}; + if ( $train_id eq 'manual' ) { + if ( $arr + and $entry->{real_arr_ts} + and $now->epoch - $entry->{real_arr_ts} > 600 ) + { + $self->app->checkout_p( + station => $arr, + force => 2, + dep_eva => $dep, + arr_eva => $arr, + uid => $uid + )->wait; + } + + next; + } + if ( $entry->{is_dbris} ) { eval { |