Multiple Instances or Live Reload #190
-
Currently I have some bree jobs that run on a cron schedule and cannot overlap or run concurrently. To solve this, we use an exclusive lock during app startup so that only a single instance of bree runs in HA mode. We also have other jobs that follow the competing consumer pattern, and should run concurrently. Ideally, I'd like bree to live update when a new job is added via the api, but that does not seem to work unless bree is stopped and restarted. As a work around, I create two discrete bree instances, one for exclusive jobs and one for concurrent jobs. My question is, is creating multiple bree instances safe, and is there a way to live reload without stopping other jobs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can always use |
Beta Was this translation helpful? Give feedback.
You can always use
bree.start
with the job name passed as the argument to start the job with scheduling setup. You would need to define "safe" for me to answer you other question. The operation of bree itself, i.e. scheduling jobs, would not conflict with each other. That doesn't say anything about what the jobs actually do though.