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

[Feature] Implement Job Queue Management with Redis and In-Memory Fallback #7940

Open
rahul-rocket opened this issue Jul 8, 2024 · 1 comment
Assignees
Milestone

Comments

@rahul-rocket
Copy link
Collaborator

Integrate "Job Queue" management into the Gauzy API. Utilize Redis for efficient job processing in production environments, with an in-memory fallback for local development scenarios. Additionally, abstract the job queue implementation to allow flexibility in choosing between Bull, Trigger.dev, or other libraries, and organize implementations into separate packages.

References:

NestJS Queues Documentation
Trigger.dev Documentation

Notes:

  1. Ensure each job queue implementation resides in its own package/module for modular and configurable deployment.
  2. Configure the application to allow users to switch between different job queue implementations based on environment configurations.
@rahul-rocket rahul-rocket self-assigned this Jul 8, 2024
@rahul-rocket rahul-rocket added this to the v0.9 milestone Jul 8, 2024
@rahul-rocket
Copy link
Collaborator Author

Summary

By following these steps, you create an abstract solution for job queue management in your application:

  • Define an Interface: JobQueue interface defines the contract for job queue implementations.
  • Implement Concrete Classes: Implement JobQueue interface using specific job queue libraries or in-memory solutions.
  • Configure Dependency Injection: Use NestJS module configuration to provide the appropriate implementation based on the environment.
  • Usage: Inject JobQueue service wherever you need to enqueue jobs, ensuring flexibility and maintainability.

This approach allows you to easily switch between different job queue implementations (such as Bull, Trigger.dev, or others) without tightly coupling your application to a specific library, promoting modularity and flexibility.

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