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

Add new event taskinprogress #539

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JeffersonGibin
Copy link

@JeffersonGibin JeffersonGibin commented Apr 26, 2024

Why was this implemented?

This was implemented to make it possible to identify a task that is in progress. Currently, it is possible to identify an error and also if a task has been added to the queue. However, in situations where it is necessary to manage the 'progress' of tasks for database management, for example, it becomes somewhat complex.

How does it work?

cluster.on("taskinprogress", (data, isCallbackExecution) => {
    if (isCallbackExecution) {
        console.log("A callback is in progress", data);
    } else {
        console.log("A task is in progress and it is not a callback", data);
    }
});

Tests

  • A test similar to the event queue test has been implemented.

Readme

  • The file README.md was updated

Missing

  • CONTRIBUTING.md don't contains version and date release.
  • The package-json don't contain this version.

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.

None yet

1 participant