work: Update route and messages
This commit is contained in:
parent
a760274c7c
commit
e500c2e537
1 changed files with 20 additions and 2 deletions
|
@ -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 }
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue