Sitelet https://github.com/errbit/errbit/pull/3129
Skip to content

Refactor interactors into model methods - #3129

Open
mikelolasagasti wants to merge 1 commit into
errbit:mainfrom
mikelolasagasti:interactors2models
Open

mikelolasagasti wants to merge 1 commit into
errbit:mainfrom
mikelolasagasti:interactors2models

Conversation

@mikelolasagasti

Copy link
Copy Markdown
Contributor

Move problem lifecycle and maintenance operations onto Problem, notice refingerprinting onto Notice, and watcher cleanup onto User.

Remove the internal interactor APIs:

  • ProblemDestroy.execute and ProblemDestroy#execute
  • ProblemMerge#merge
  • ProblemRecacher.run
  • NoticeRefingerprinter.run/refingerprint
  • ResolvedProblemClearer#execute
  • OutdatedProblemClearer#execute
  • UserDestroy#destroy

Use User's before_destroy lifecycle callback to remove embedded watchers, fetch dependent IDs efficiently with Mongoid pluck, and clarify the merge validation error.

Update jobs, controllers, rake tasks, and specs while preserving the existing domain behavior and cleanup guarantees.

Move problem lifecycle and maintenance operations onto Problem,
notice refingerprinting onto Notice, and watcher cleanup onto User.

Remove the internal interactor APIs:
- ProblemDestroy.execute and ProblemDestroy#execute
- ProblemMerge#merge
- ProblemRecacher.run
- NoticeRefingerprinter.run/refingerprint
- ResolvedProblemClearer#execute
- OutdatedProblemClearer#execute
- UserDestroy#destroy

Use User's before_destroy lifecycle callback to remove embedded
watchers, fetch dependent IDs efficiently with Mongoid pluck, and
clarify the merge validation error.

Update jobs, controllers, rake tasks, and specs while preserving the
existing domain behavior and cleanup guarantees.

This branch has not been deployed

No deployments
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.

1 participant