a year ago
Hi, it would be nice with scheduled rebooting if possible to combat memory leak in backend. Yes it's not optimal to have a memory leak but it's a very small leak I'm trying to debug in the meantime I want to reboot the backend once a day.
0 Replies
a year ago
thanks for sharing your usecase!
a year ago
this template was made with your exact use case in mind -
a year ago
n/a
a year ago
let me know if you run into any difficulties
it's not clear from the instructions if I need to use your template or not it says this:
"Once the bookmarklet has been added to your bookmark bar, open your Railway project and desired service,"
What do you mean desired service? The Railway Cron service or something else?
I think it would make more sense in your instructions to put the "deploy this template" first because it I put the schedule_1 and stuff like that in my other service
a year ago
you could also do it in code. I'm also doing a restart once a day with a cron job
node+nestjs
@Cron('0 8 * * *', {
timeZone: constants.worker.timezones.iceland,
})
async restart() {
await this.railwayService.restart(RailwayServices.api);
}
restart() {
await this.axiosService.post(this.config.url, {
headers: {
Authorization: `Bearer ${this.config.apiKey}`,
'Content-Type': 'application/json',
},
data: {
query: `
mutation DeploymentRestart($id: String!) {
deploymentRestart(id: $id)
}
`,
variables: { id },
},
});
}
a year ago
this is exactly what the service I made does.
a year ago
have you read the templates overview?
I thought I did a pretty good job at explaining every little detail needed to deploy it
a year ago
uhhh well i would have never imagined id need to tell you to deploy the template
a year ago
can you help me understand the thought process behind being able to use a template without ever deploying it?
i thought I would make it myself by following the text and skip the template
I never used CRON before so this might add to the confusion. I followed everything in the text, I put the schedule_1 and token on my service variables for the thing I wanted to restart
anyway I don't think there is much to improve in the instructions, it comes from inexperience with both railway and cron on my side
a year ago
sounds good, so you did get it to work in the end?
a year ago
awsome, and i always wanna hear peoples usecase for it, would you mind sharing?
a year ago
same as this threads title?
a year ago
cool, thanks for sharing