Skip to content

Conversation

@boris-w
Copy link
Contributor

@boris-w boris-w commented Oct 11, 2025

No description provided.

@boris-w boris-w requested review from caoxing9 and Copilot October 11, 2025 03:24
Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Oct 11, 2025

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'.

Suggested change
// 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

Copilot uses AI. Check for mistakes.
},
});
await this.attachmentsCropQueueProcessor.queue.add('attachment_crop_image', {
await this.attachmentsCropJob.addAttachmentCropImage({
Copy link

Copilot AI Oct 11, 2025

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.

Copilot uses AI. Check for mistakes.
@boris-w boris-w force-pushed the feat/queue-consumer-separation branch from c7ef181 to 4e6adcd Compare October 11, 2025 06:58
@boris-w boris-w force-pushed the feat/queue-consumer-separation branch from 3f7a8ad to c9603ab Compare October 11, 2025 08:23
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.

2 participants