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

JobLock option reEnqueue to skip trying job again #449

Merged
merged 1 commit into from
Sep 30, 2020

Conversation

evantahler
Copy link
Member

This PR adds a new plugin setting for JobLock to skip re-enqueuing the job if another instance of the job is already being worked on.

const jobs = {
  withReEnqueue: {
    plugins: ["JobLock"],
    pluginOptions: {},  // or the default { JobLock: { reEnqueue: true } },
    perform: async () => {
      return "hi";
    },
  },
  withoutReEnqueue: {
    plugins: ["JobLock"],
    pluginOptions: { JobLock: { reEnqueue: false } },
    perform: async () => {
      return "hi";
    },
  },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant