Skip to content

refactor(server): system config - #1353

Merged
alextran1502 merged 9 commits into
mainfrom
refactor/system-config
Jan 21, 2023
Merged

alextran1502 merged 9 commits into
mainfrom
refactor/system-config

Conversation

@jrasm91

@jrasm91 jrasm91 commented Jan 18, 2023 •

Copy link
Copy Markdown
Member

This PR refactors system-config and immich-config into the domain.

  • New interface for IJobRepository which has an add(item: JobItem) which is basically JobName + data (typed). This was necessary to remove the bull / queue dependency from the domain.
  • Move BullModule to the Infra module (only needed in this one place now, so all the queues are registered there, once)
  • Refactor ImmichConfigService and SystemConfigService into SystemConfigService and SystemConfigCore
  • Update entity imports to be @app/infra/db/entities - There was a circular dependency caused problems with the tests. Entities have no external dependencies. (Might want to move them to the @app/domain at some point.
  • Split out repo calls into a ISystemConfigRepository interface

TODO:

  • Finish JobRepository.add implementation (or decide if I'll add the implementations as we refactor associated code)
  • Add tests to bring domain coverage to ~85%

This got a little away from me. I didn't realize originally that system config had a dependency on bull queues, but then I didn't want to start over 🤷

@vercel

vercel Bot commented Jan 18, 2023 •

Copy link
Copy Markdown

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

Name Status Preview Comments Updated
immich ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 21, 2023 at 3:00AM (UTC)
immich-code-coverage ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 21, 2023 at 3:00AM (UTC)

@jrasm91 jrasm91 changed the title refactor: system config refactor(server): system config Jan 18, 2023
@jrasm91
jrasm91 requested a review from jbaez January 18, 2023 16:52
@vercel
vercel Bot temporarily deployed to Preview – immich-code-coverage January 20, 2023 20:36 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich January 20, 2023 20:37 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich-code-coverage January 20, 2023 20:39 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich January 20, 2023 20:39 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich-code-coverage January 20, 2023 20:44 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich January 20, 2023 20:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich-code-coverage January 21, 2023 02:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – immich January 21, 2023 03:00 Inactive
@alextran1502
alextran1502 merged commit c0a6b3d into main Jan 21, 2023
@alextran1502
alextran1502 deleted the refactor/system-config branch January 21, 2023 16:11

This branch was previously deployed

2 inactive deployments
Preview – immich — 3a5ebfc5 Deployed Jan 21, 2023 by vercel[bot]
Preview – immich-code-coverage — 3a5ebfc5 Deployed Jan 21, 2023 by vercel[bot]
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