Is it possible to make it so that an app always starts as though it was just restarted? ?
maadabrandon
HOBBYOP

a year ago

The app works as intended. That is, it generates a map that provides the results of two machine learning models at various locations.

However, once the map and its associated data have been generated by a user, all this information seem to get cached somehow . As a result, when a different user starts the app, the data that was previously loaded is provided immediately, instead of being generated from scratch (which is what I want).

Manually clicking "restart" on the deployment resets the app, putting it in the desired state that one time. However, I'd like the app to be in this state every time it's opened.

5 Replies

a year ago

Yes you can get your app restarted on a schedule, but I would highly recommend actually fixing the code issue instead of the hacky solution of just restarting it, that would be by far a more efficient use of your time.


maadabrandon
HOBBYOP

a year ago

Thanks a lot for responding so promptly, Brody. I really appreciate it.

Would that have to be done using a a railway config (TOML) file, or would it have to be done my modifying the underlying code of my project?

Sorry if that seems like a silly question. I'm quite new to all this.

I'm also curious about how it could be restarted on a schedule (though I acknowledge your point about efficiency)


a year ago

It would be done with this - https://railway.app/template/fwH-l3

But please consider fixing your code to behave how you want.


maadabrandon
HOBBYOP

a year ago

Thanks for your work on that template, Brody.

I'm thinking about whether there's a way I can make the change from within my code, as that would be ideal.


a year ago

Whatever works best for you!


Loading...