Skip to content

fix: The memory generation job does not work correctly#28062

Open
ExceptionsOccur wants to merge 1 commit intoimmich-app:mainfrom
ExceptionsOccur:fix/memory_generation_job_not_work
Open

fix: The memory generation job does not work correctly#28062
ExceptionsOccur wants to merge 1 commit intoimmich-app:mainfrom
ExceptionsOccur:fix/memory_generation_job_not_work

Conversation

@ExceptionsOccur
Copy link
Copy Markdown
Contributor

Description

1.The memory generation job fails to run correctly due to a database field issue. For details, see discussions#25906.

2.Modify the job's execution condition: if the execution time does not match the nightly tasks settings, it should be considered a manually triggered job.

3.Since the memory and memory_asset tables lack unique constraints, manually running the memory generation job multiple times results in duplicate records. Therefore, the cleanup logic needs to be adjusted. The solution is to clear all existing records and regenerate them.

How Has This Been Tested?

none

API Changes

none

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

none

@immich-push-o-matic
Copy link
Copy Markdown

immich-push-o-matic Bot commented Apr 24, 2026

Label error. Requires exactly 1 of: changelog:.*. Found: 🗄️server. A maintainer will add the required label.

@alextran1502 alextran1502 requested a review from jrasm91 April 24, 2026 14:23
@danieldietzler
Copy link
Copy Markdown
Member

The discussion you're referencing has long been resolved and a bug fix has been released. What are you actually fixing here?

@ExceptionsOccur
Copy link
Copy Markdown
Contributor Author

The discussion you're referencing has long been resolved and a bug fix has been released. What are you actually fixing here?

It seems this issue still hasn't been resolved. Last time, I only pointed out where the problem is, but I didn't submit the corresponding code, and it appears no one else has addressed it either.

@ExceptionsOccur ExceptionsOccur force-pushed the fix/memory_generation_job_not_work branch from a2eff46 to 1ac43a8 Compare April 26, 2026 05:34
@danieldietzler
Copy link
Copy Markdown
Member

I read through your comment in the discussion and I'm still failing to understand. AFAICT everything works as intended. With your changes you simply end up deleting all your memories nightly, which surely cannot be the goal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants