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: allow to replace queues completely #88

Merged
merged 3 commits into from
Mar 27, 2020
Merged

feat: allow to replace queues completely #88

merged 3 commits into from
Mar 27, 2020

Conversation

katsanva
Copy link
Contributor

This target to sync 1:1 queues that are available in-app and in bull-board.

The pseudocode here is

const queues = [];

setQueues(queues);

app.use("/", UI);

app.post("/queues", (req, res) => {
  queues.push(new Queue(...req.body));

  setQueues(queues); // this one is ok, we're adding a queue
});

app.delete("/queues/:id", () => {
  queues.splice(req.params.id, 1);

  // setQueues(queues); // this one will not work, because it doesn't perform a removal
  replaceQueues(queues);
});

@vcapretz vcapretz merged commit 56b976d into felixmosh:master Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants