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

refactor(server): bull jobs #2569

Merged
merged 5 commits into from
May 26, 2023
Merged

refactor(server): bull jobs #2569

merged 5 commits into from
May 26, 2023

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented May 25, 2023

Before:

  • Processors registered job handlers to specific queues
  • The JobRepository added job to the (hopefully) right queue. (the switch was missing the user delete check job)
  • Concurrency set at the job level and stacks

After:

  • The Job to Queue map is maintained in job.contants.ts file
  • Concurrency is maintained in job.constants.ts and is a single number per queue.
  • SidecarProcessor moved to MetadataService
  • A single job to handler mapping

@jrasm91 jrasm91 requested a review from bo0tzz May 25, 2023 19:25
@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) May 26, 2023 2:00am

[JobName.SIDECAR_SYNC]: QueueName.SIDECAR,
};

export const QUEUE_TO_CONCURRENCY: Record<QueueName, number> = {
Copy link
Contributor

@alextran1502 alextran1502 May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help explain these numbers? Maybe put some comment on top of this const would be beneficial

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment explaining this is for queue level concurrency settings.

@alextran1502 alextran1502 merged commit 065fb16 into main May 26, 2023
@alextran1502 alextran1502 deleted the refactor/bull-jobs branch May 26, 2023 12:52
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