Skip to content

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Aug 16, 2025

Builds on previous work in scheduled-delete-exports (#3655) – this PR includes code from that one so #3655 should be pulled first.

Adds new background jobs:

  • schedulable job to scan connectors for book covers for editions without them
  • non-schedulable job to scan connectors for book covers for editions where they have a cover filepath but it does not resolve to an actual file

I also had to move set_cover_from_url() to utils.images because trying to use it from a model was causing circular import problems.

I made some choices that others may not agree with (e.g. don't allow regular schedule for finding incorrect cover filepaths - mostly because it seems like it would take a lot of resources to check but is a niche problem). Also there's a nested series of if statements I'm not thrilled about - so I'm happy to take feedback for improving it!

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

Builds on previous work in `scheduled-delete-exports`.

Adds new background jobs:

* schedulable job to scan connectors for book covers for editions without them
* non-schedulable job to scan connectors for book covers for editions where they have a cover filepath but it does not resolve to an actual file

I also had to move `set_cover_from_url()` to utils.images because trying to use it from a model was causing circular import problems.
@hughrun hughrun requested a review from mouse-reeve August 16, 2025 10:40
@hughrun
Copy link
Contributor Author

hughrun commented Aug 16, 2025

Sorry about all the commits 🙃

@hughrun hughrun added enhancement New feature or request plumbing PR for internal processes or background jobs and removed enhancement New feature or request labels Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plumbing PR for internal processes or background jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove all removed images
1 participant