Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] modify jobs function #169

Open
shadowgate15 opened this issue Mar 22, 2022 · 3 comments
Open

[feat] modify jobs function #169

shadowgate15 opened this issue Mar 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@shadowgate15
Copy link
Member

What problem are you trying to solve?

Would be good to provide a bree.modify function to modify an existing job and rerun validation on the job.

@shadowgate15
Copy link
Member Author

Use bree.update instead

@vnln
Copy link

vnln commented Dec 22, 2023

bree.update

is it deprecated? couldn't find a single mention in the documentation

@aentwist
Copy link

aentwist commented Jun 21, 2024

Use case: managing jobs in Electron using RxDB (store is IndexedDB). RxDB uses RxJS to make data observable/reactive. So my flow should be: get list of jobs from DB -> start bree -> user updates job in UI -> RxDB query saves update + list of jobs automatically updates since it is reactive -> subscribe to that and on update sync bree

In theory I guess its the same with any data store. User updates job after bree is started -> persist update -> need to update it in bree as well

What is the current workaround and what are the downsides of it? I guess it must be something like, ?

bree.stop('beep');

(async () => {
  await bree.add('beep2');
})();

(async () => {
  await bree.start('beep2');
})();

I hope I can name beep2 beep and overwrite the existing job since there does not seem to be a way to remove jobs from a started bree, despite there being a way to add more. In an ideal world maybe a set function with an array of job is what I'm looking for? Which would be a separate issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants