[discussion] Duplicate job name question
owen95t opened this issue · comments
What would you like to discuss?
After a certain job is ran and successfully exits, when I try to create a new job with the same name, it is telling me that a job with that name already exists. How can that be? I may be missing something?
Checklist
- [ √] I have read the documentation.
After a job is run the job is not deleted, only the worker. You could use bree.remove
followed by bree.add
or just modify bree.configs.jobs
and then call bree.start
. I would suggest using the first option as bree.add
will validate the job.
When I have time I'll add this function which would make this process easier.
After a job is run the job is not deleted, only the worker. You could use
bree.remove
followed bybree.add
or just modifybree.configs.jobs
and then callbree.start
. I would suggest using the first option asbree.add
will validate the job.
I see. Thanks I'll use bree.remove for now. But it seems that Bree caches these names as well as it seems to persist. I have no idea what names exists in the cache so is there a location to clear such cache? Or can I just reinstall bree.
Bree doesn't do any caching. It is just scanning the bree.configs.jobs[].name. You should be able to call bree.config.jobs.map((j) => j.name)
to get the list.