Workers and auto-deploy
tansandoteth
PROOP

2 years 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

2 years ago

N?A


2 years ago

what is your current deploy source? github?


2 years 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.


2 years 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


2 years ago

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


tansandoteth
PROOP

2 years ago

Ooo okay these are some good ideas


tansandoteth
PROOP

2 years ago

I can look more into that


2 years ago

question, how long could a job take?


tansandoteth
PROOP

2 years ago

Usually a few hours


2 years ago

gotcha


Welcome!

Sign in to your Railway account to join the conversation.

Loading...