Commit graph

169 commits

Author SHA1 Message Date
Daniel Friesel
07e0f89706 allow checking into traewelling 2020-10-01 19:36:35 +02:00
Daniel Friesel
89e709d8d5 Allow linking a Träwelling account, auto-sync Träwelling→travelynx
travelynx→Träwelling is still work-in-progress

Squashed commit of the following:

commit 97faa6e2e6c8d20fba30f2d0f6e78187ceeb72e6
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Wed Sep 30 18:50:05 2020 +0200

    improve traewelling log and tx handling

commit 487d7dd728b9d45b731bdc7098cf3358ea2e206e
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Wed Sep 30 18:02:41 2020 +0200

    add missing traewelling template

commit 0148da2f48d9a52dcddc0ab81f83d8f8ac3062ab
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Wed Sep 30 18:02:35 2020 +0200

    improve traewelling pull sync

commit 4861a9750f9f2d7621043361d0af6b0a8869a0df
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Tue Sep 29 22:14:24 2020 +0200

    wip checkin from traewelling

commit f6aeb6f06998a2a7a80f63a7b1b688b1a26b66bd
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Tue Sep 29 18:37:53 2020 +0200

    refactor traewelling integration. login and logout are less of a hack now.

    checkin and checkout are not supported at the moment.
2020-09-30 19:12:29 +02:00
Daniel Friesel
717cc18a40 Move get_departures to a separate IRIS helper 2020-08-06 16:04:12 +02:00
Daniel Friesel
a3ea4fde95 fix a typo 2020-04-16 16:52:19 +02:00
Daniel Friesel
da05a0e981 maintenance: backpropagate polylines to route entries using pre-1.9.4 format 2020-04-16 16:29:34 +02:00
Daniel Friesel
4cc510d710 use polyline when computing monthly/yearly distance travelled
Closes #40
2020-04-14 18:22:49 +02:00
Daniel Friesel
2652ea6bab auto-checkout for cancelled departure: guard against destination changes 2020-02-18 17:38:53 +01:00
Daniel Friesel
cc7439dd5e handle departure cancellation after checkin 2020-02-17 21:13:07 +01:00
Daniel Friesel
6cbbc2b16f avoid stale data when marking cancelled arrivals 2020-02-13 18:35:42 +01:00
Daniel Friesel
a830acc698 Handle cancelled arrival at checkout when departure at checkin is not cancelled 2020-02-12 20:38:24 +01:00
Daniel Friesel
7564ec34db munin: Add polyline compression ratio 2020-02-10 20:06:55 +01:00
Daniel Friesel
c2e0f377be maintenance: consider station renames whan backpropagating polylines 2020-02-06 17:54:23 +01:00
Daniel Friesel
0457a53f65 maintenance: only fetch polylines from journeys which were not edited 2020-02-04 21:23:22 +01:00
Daniel Friesel
7e92e6b5d4 retroactively add polylines to non-polyline journeys 2020-01-30 18:06:04 +01:00
Daniel Friesel
297718603c munin: return number of stored polylines 2020-01-27 20:33:35 +01:00
Daniel Friesel
b47a29d484 Store journey polylines in DB
Squashed commit of the following:

commit d60c7d3c98d88a8f5b0e3ced6c11b56053e1e44b
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Mon Jan 27 20:22:46 2020 +0100

    fix bugs related to users without past journeys

commit 707fcc937ac7f6bc3dc29024273f5e74963f7f15
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Mon Jan 27 20:19:14 2020 +0100

    work around Cache::file turning floats into strings

commit 55831121eb30bc30ed20134bbb48e4bee9772feb
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Mon Jan 27 19:43:29 2020 +0100

    store journey polylines for later use

commit 1971d511037ff2b8fbc9699cb98e4f8fd51261e5
Author: Daniel Friesel <derf@finalrewind.org>
Date:   Sat Jan 25 16:49:48 2020 +0100

    set preliminary database schema for polyline storage.

    deduplication will follow at a later stage
2020-01-27 20:32:15 +01:00
Daniel Friesel
75363c35cc work: Fix race condition
When a user changes their destination station or checks into a new train
while work is updating data for their in_transit entry, values for no longer
valid database entrie would be entered.
2020-01-23 17:14:01 +01:00
Daniel Friesel
f9f1eec499 Use EVA IDs instead of travelynx-internal station IDs. Not 100% tested yet. 2019-12-23 22:57:45 +01:00
Daniel Friesel
c6634b4097 maintenance: remove checkins which were entered more than 48 hours ago 2019-12-20 18:56:57 +01:00
Daniel Friesel
b0ddada5d1 munin: Add 'currently checked in' counter 2019-12-19 19:22:56 +01:00
Daniel Friesel
cabf159f46 Handle Berlin Ringbahn and other transfer-at-destination trains
Requires Travel::Status::DE::IRIS v1.38 (not released yet)
2019-12-15 13:42:11 +01:00
Daniel Friesel
6d45533c14 mark cancelled stops in checkin view 2019-10-04 23:27:45 +02:00
Daniel Friesel
8c160f6854 Fix wagon order and direction display
This was broken by a database migration introduced in
commit f6d56d3134
2019-08-31 09:18:49 +02:00
Daniel Friesel
f6d56d3134 Add proper journey comment support 2019-08-23 10:34:02 +02:00
Daniel Friesel
e259a5e5dd Fix beeline distance calculation when start/stop has no geo-coordinates 2019-08-13 21:30:59 +02:00
Daniel Friesel
0bbdd768f4 prepare for wagon order support 2019-06-17 20:59:57 +02:00
Daniel Friesel
b54c977e08 increase checkout delay to work around IRIS information lag 2019-06-10 18:09:54 +02:00
Daniel Friesel
7be3a4219e checked in: Show QoS messages before departure and HIM messages at all times 2019-06-04 21:12:36 +02:00
Daniel Friesel
f355a8d95e disappearing trains are no longer critical with the latest change 2019-06-01 12:38:26 +02:00
Daniel Friesel
b1591eed54 show current/next stop while checked in 2019-05-31 20:18:22 +02:00
Daniel Friesel
7fe95532c1 Use JSON for messages and route storage, prepare for extended route data 2019-05-26 17:28:21 +02:00
Daniel Friesel
1dc04eb45a show journey suggestions on departure board as well 2019-05-20 19:15:21 +02:00
Daniel Friesel
7486920a6a Proactively recompute yearly stats to avoid long user wait times 2019-05-18 17:11:28 +02:00
Daniel Friesel
e68043b8fb Show arrival/departure platform in journey card 2019-05-18 17:10:53 +02:00
Daniel Friesel
b36ba45aef WiP webhook support 2019-05-05 18:09:11 +02:00
Daniel Friesel
b4bb68b7c3 Add worker command for Docker setups (#9) 2019-05-03 18:26:05 +02:00
Daniel Friesel
fb2a06c59c work: Not finding a train at the destination is usually not an error 2019-05-02 10:05:49 +02:00
Daniel Friesel
048767149e use a separate table for registration tokens 2019-04-30 18:05:07 +02:00
Daniel Friesel
a57a24c2d6 add "active user count" munin command 2019-04-30 12:56:11 +02:00
Daniel Friesel
99aa3a4a0d Implement deletion of inactive accounts 2019-04-30 12:48:23 +02:00
Daniel Friesel
867a5d4afb allow users to change their mail address
Closes #6
2019-04-30 12:08:51 +02:00
Daniel Friesel
0226eba60a maintenance: Also delete pending_passwords entries 2019-04-29 20:32:04 +02:00
Daniel Friesel
25d0530e86 Add password reset functionality
Closes #5
2019-04-29 20:12:59 +02:00
Daniel Friesel
6ff397c9b3 add database table/column comments 2019-04-29 10:25:17 +02:00
Daniel Friesel
fd6d12d355 Handle inconsistent data when calculating monthly/yearly stats
Closes #11
2019-04-28 22:33:09 +02:00
Daniel Friesel
e500c2e537 work: Update route and messages 2019-04-26 22:12:34 +02:00
Daniel Friesel
fd314e327d maintenance, munin: Use journeys, not user_actions 2019-04-24 08:45:56 +02:00
Daniel Friesel
ffaa0c44a7 Automatic checkout \o/ 2019-04-23 21:30:31 +02:00
Daniel Friesel
e168d9cd39 Use one row per journey instead of split checkin/checkout entries
Whether a user is in transit or not is now determined by an entry in the
in_transit table instead of a dangling checkin.

All completed journeys are stored in the "journeys" table.

This does most of the work needed for automatic checkout. However, note that
the corresponding worker process is not implemented yet.
2019-04-23 18:08:07 +02:00
Daniel Friesel
812be4f0cb Finish transition from DBI to Mojo::Pg 2019-04-22 13:42:41 +02:00
Daniel Friesel
c65232904f Use Mojo::Pg for migrations 2019-04-22 12:30:05 +02:00
Daniel Friesel
b860b46e52 database migrate: Use truncate 2019-04-21 17:45:25 +02:00
Daniel Friesel
78b2d995ef Ignore stations without coordinates in distance calculation
Reported by @marudor
2019-04-21 15:46:19 +02:00
Daniel Friesel
eff979081c Add a registration test 2019-04-18 14:51:45 -04:00
Daniel Friesel
065c844fde Refactor munin command to use Mojo::Pg 2019-04-17 13:36:01 -04:00
Daniel Friesel
ecedc6a4f2 Add a dumpconfig command, mostly useful to debug Docker setups 2019-04-17 07:11:04 -04:00
Daniel Friesel
c19f239d1d Do not print error when encountering an empty database 2019-04-14 08:44:27 +02:00
Markus Witt
ed397093c2 database setup: merge setup and migration code paths 2019-04-13 23:36:58 +02:00
Daniel Friesel
4d413d06a3 "database" sub-command: Provide an exit status 2019-04-13 17:17:44 +02:00
Markus Witt
4bf62cf2a8 fix dbschema: add type for edited 2019-04-13 16:56:15 +02:00
Daniel Friesel
61b1ef398e maintenance: Fix stats table name 2019-04-13 11:52:26 +02:00
Daniel Friesel
bba6721754 Allow journey editing, keep track of edited journey attributes
Provides a workaround for #2
2019-04-09 18:37:21 +02:00
Daniel Friesel
d0b6b7e052 Cache journey stats 2019-04-07 16:55:35 +02:00
Daniel Friesel
8096c33c00 Add a note about updating travelynx 2019-04-07 14:18:56 +02:00
Daniel Friesel
c4a60375f4 Add a database command for database setup and migrations 2019-04-06 21:08:36 +02:00
Daniel Friesel
76f6922e82 maintenance: delete accounts which requested deletion 2019-03-31 17:58:05 +02:00
Daniel Friesel
00efb2e320 Move maintenance script to Mojolicious command 2019-03-25 19:54:49 +01:00
Daniel Friesel
edf4642933 Migrate munin command 2019-03-25 18:17:54 +01:00
Daniel Friesel
e53ab5f781 move munin-stats to a mojolicious command 2019-03-22 21:18:03 +01:00