Workers and auto-deploy
tansandoteth
PROOP

a year ago

  1. Is there a way to disable auto deploy? I have workers that are in a middle of a job that I don't want disrupted until its finished with a job before deploying a new version.

  2. Is there a way "trigger" a job? Ex, I have a task that I only need to run once in a while so currently I'm just remove the instance and re-deploying

10 Replies

tansandoteth
PROOP

a year ago

N?A


billydotws
FREE

a year ago

what is your current deploy source? github?


billydotws
FREE

a year ago

If so: Unlink the github repository and setup a github action instead:

https://github.com/bervProject/railway-deploy (externally supported, not railway official).

Then make it only trigger on a specific branch/if specific conditions are met

Example: send something (e.g. api request) to your worker controller to pause new consumption, then poll in the github action until the controller says the deployment is safe (no jobs running)

Once it deploys, another action, un-pauses the controller (which allows it to consume the remaining jobs).

Look at the GA docs, that'd be the best idea if you're wanting non-default/special behaviour.


billydotws
FREE

a year ago

--

Is there a way "trigger" a job? Ex, I have a task that I only need to run once in a while so currently I'm just remove the instance and re-deploying
What's the requirement?

Is this happening, for example every sunday, or at a specific day/time? or are you looking for more sporadic/on demand?

If predictable - use cron jobs
If on demand - you'd integrate with the API [https://docs.railway.app/reference/public-api] and have whatever needs to run the task call it


billydotws
FREE

a year ago

to disconnect auto deploy from github: https://i.imgur.com/MmTp1jg.png


tansandoteth
PROOP

a year ago

Ooo okay these are some good ideas


tansandoteth
PROOP

a year ago

I can look more into that


brody
EMPLOYEE

a year ago

question, how long could a job take?


tansandoteth
PROOP

a year ago

Usually a few hours


brody
EMPLOYEE

a year ago

gotcha


Loading...