Tust cancellation

63 views
Skip to first unread message

Chris French

unread,
Jul 7, 2026, 3:28:23 PM (14 days ago) Jul 7
to openrail...@googlegroups.com
Hey can anyone tell me how to deal with the cancellation message from the trust movement feed please. 

I create a db row on activation and mark it as cancelled when I get this message but I now have them piling up. I do handle the reinstatement but Is there a point where a cancelled row is safe to delete.

Thanks 

Chris

Peter Hicks

unread,
Jul 7, 2026, 3:34:51 PM (14 days ago) Jul 7
to openrail...@googlegroups.com
Hi Chris

On Tuesday, 7 July 2026 at 20:28, Chris French <cr_f...@hotmail.com> wrote:

Hey can anyone tell me how to deal with the cancellation message from the trust movement feed please. 

I create a db row on activation and mark it as cancelled when I get this message but I now have them piling up. I do handle the reinstatement but Is there a point where a cancelled row is safe to delete.

Your question is probably deeper than "How do I deal with it" - you need to look at what you're trying to do here.

The cancellation message is an 'event', a "this has happened", and what that event means in your world could be anything.  Do you mark the schedule to which is relates as (part-)cancelled?  Do you send a message out to a user?  Do you start another process to look for alternative trains for a user who might have told you about their intent to travel from A to B?

You could look at your database key - if you're using the 10-character train identity from TRUST as your unique key for a service, that will only be unique for around 21 days, possibly more but it depends on specifics.  You might then want to delete any data for trains before a certain date before your database rolls over.


Peter

Chris French

unread,
Jul 7, 2026, 4:23:57 PM (14 days ago) Jul 7
to openrail...@googlegroups.com
I’m wanting to track active trains only. So if a train has finished it journey I'd like to delete it. Would a better question be to ask how long after a train cancellation can a reinstatement be sent? 

Christian French
07545 285 402

From: 'Peter Hicks' via A gathering place for the Open Rail Data community <openrail...@googlegroups.com>
Sent: Tuesday, 07 July 2026 20:34:36
To: openrail...@googlegroups.com <openrail...@googlegroups.com>
Subject: Re: [openraildata-talk] Tust cancellation
 
--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/openraildata-talk/GAySRJ66uYRlW4Vg19_S0YaRPN96mD_2Zpe1idpStYSGQWo8ck7KV73XOqtICuJI_xyH7c1BEUCkLyk_vpnWMDgqlYiphfD7C8wnb-IJDHg%3D%40poggs.co.uk.

Peter Hicks

unread,
Jul 7, 2026, 4:44:29 PM (14 days ago) Jul 7
to openrail...@googlegroups.com
Hi Chris

On Tuesday, 7 July 2026 at 21:23, Chris French <cr_f...@hotmail.com> wrote:

I’m wanting to track active trains only. So if a train has finished it journey I'd like to delete it. Would a better question be to ask how long after a train cancellation can a reinstatement be sent? 

There isn't a concept of an 'active' train.  An activation means a schedule has been assigned a train ID, but there is no opposite event, 'de-activation'.  An train must be activated before it can be reported upon, or cancelled.

I'd say that you're unlikely to see a train reinstated more than three hours after it was scheduled to arrive at its destination.  Freight and engineering trains may be an exception to this, and if your application needs those, you could just delete any train 12 hours after termination, or 24 hours after activation.


Peter

Chris French

unread,
Jul 7, 2026, 4:50:31 PM (14 days ago) Jul 7
to openrail...@googlegroups.com
That’s great il delete after 24h. thank you.

Christian French
07545 285 402

From: 'Peter Hicks' via A gathering place for the Open Rail Data community <openrail...@googlegroups.com>
Sent: Tuesday, 07 July 2026 21:44:16

To: openrail...@googlegroups.com <openrail...@googlegroups.com>
Subject: Re: [openraildata-talk] Tust cancellation
--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages