-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The work done in #107/#109 already improved the boot process by ensuring that a dataset is not "unregistered" (disappears from the routes) completely until next deploy if the static part is not available at boot time.
After #109 is merged, though, in case of unavailability at boot, the dataset download will only be retried 24h later at the moment, via this code:
transpo-rt/src/actors/update_actors.rs
Lines 54 to 64 in ee95aa2
impl actix::Actor for BaseScheduleReloader { | |
type Context = actix::Context<Self>; | |
fn started(&mut self, ctx: &mut Self::Context) { | |
info!(self.log, "Starting the base schedule updater actor"); | |
ctx.run_interval(std::time::Duration::from_secs(60 * 60 * 24), |act, ctx| { | |
info!(act.log, "reloading baseschedule data"); | |
act.update_data(ctx); | |
}); | |
} | |
} |
Detecting the unavailability (at boot and also later) and rescheduling with shorter timeframes (possibly with a form of backoff) would be a real improvement.
Todos
- Figure out how to move forward in time, to implement proper tests on this workflow. It could be done via introspection of scheduled
run_interval
in Actix, if available, or via another form of tweak. - Make sure to avoid cascading downloads (e.g. all of a sudden, we end up downloading multiple times) - see cascading failures in distributed systems for the overall idea
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request