work: Update route and messages

This commit is contained in:
Daniel Friesel 2019-04-26 22:12:34 +02:00
parent a760274c7c
commit e500c2e537

View file

@ -44,7 +44,17 @@ sub run {
$db->update(
'in_transit',
{ real_departure => $train->departure },
{
real_departure => $train->departure,
route => join( '|', $train->route ),
messages => join(
'|',
map {
( $_->[0] ? $_->[0]->epoch : q{} ) . ':'
. $_->[1]
} $train->messages
)
},
{ user_id => $uid }
);
}
@ -78,6 +88,14 @@ sub run {
{
sched_arrival => $train->sched_arrival,
real_arrival => $train->arrival,
route => join( '|', $train->route ),
messages => join(
'|',
map {
( $_->[0] ? $_->[0]->epoch : q{} ) . ':'
. $_->[1]
} $train->messages
)
},
{ user_id => $uid }
);