-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: separate queue jobs from consumers for configurable processing #1968
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR separates queue jobs from their consumers to enable configurable processing through environment variables. The refactoring allows for disabling queue consumers while maintaining the ability to enqueue jobs.
- Extracted job interfaces and queue management logic into separate "job" classes
- Created a utility function to conditionally provide queue processors based on environment configuration
- Refactored all queue-related services to depend on job classes instead of processors directly
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk/src/context/app/useConnection.tsx | Updated comment to reflect correct timeout duration |
| apps/nestjs-backend/src/utils/queue.ts | Added utility function for conditional queue processor provisioning |
| apps/nestjs-backend/src/share-db/share-db.service.ts | Removed unnecessary transaction wrapper for table metadata updates |
| Multiple processor files | Refactored to separate job management from processing logic |
| Multiple job files | New files containing queue interfaces and job management logic |
| Multiple module files | Updated to use conditional processor providers and export job classes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| useConnectionAutoManage(socket, updateShareDb, { | ||
| // 10 minutes, it will be closed when the user is leave the page for 1 hour | ||
| // 1 hour, it will be closed when the user is leave the page for 1 hour |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected grammar from 'user is leave' to 'user leaves'.
| // 1 hour, it will be closed when the user is leave the page for 1 hour | |
| // 1 hour, it will be closed when the user leaves the page for 1 hour |
| }, | ||
| }); | ||
| await this.attachmentsCropQueueProcessor.queue.add('attachment_crop_image', { | ||
| await this.attachmentsCropJob.addAttachmentCropImage({ |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method call should pass the data object directly to maintain consistency with the queue.add pattern used elsewhere in the codebase.
c7ef181 to
4e6adcd
Compare
3f7a8ad to
c9603ab
Compare
No description provided.