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

[newPlatform] Migration of queue #2718

Closed
5 tasks done
Tracked by #2591
Desvelao opened this issue Dec 31, 2020 · 1 comment
Closed
5 tasks done
Tracked by #2591

[newPlatform] Migration of queue #2718

Desvelao opened this issue Dec 31, 2020 · 1 comment
Assignees

Comments

@Desvelao
Copy link
Member

Desvelao commented Dec 31, 2020

Parent issue #2591

Description

Migrate the queue process to the new platform.

Tasks

  • Create a function to attach to start plugin method
  • Refactor class with static methods to functions
  • Adapt instances of Queue in backend to the new exports
  • Move cron frequency to contants file
  • Testing
@Desvelao
Copy link
Member Author

Changes

  • Refactorized class with static methods to functions.
  • Renamed exported functions.
  • Refactorized as the queue jobs are run.
  • Moved the cron frequency constant to util/constants file.
  • Refactorized in wazuh-api.ts the use to add a job to the queue.

Test suite

Created a test suite with the next tests:

  • Check the job is added to the queue.
  • Check the job is removed from the queue after execution.

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

No branches or pull requests

1 participant