Commit 8135dd0
committed
Fix OPDS circulation-only updates being skipped after hash-based detection
The `opds_import_task` was not passing `apply_circulation` to
`importer.import_feed`, making the fallback path for "bibliographic
unchanged, circulation changed" completely dead code. Pass
`apply.circulation_apply.delay` to restore that path.
Add a `needs_apply` guard to the `elif` branch in
`import_feed_from_response` so `apply_circulation` is only queued when
the circulation data has actually changed, preventing redundant tasks on
every re-import of unchanged content.
Fix `CirculationData.needs_apply` to always return `True` when
`self.licenses` is not None (ODL-style pools). License expiry is
time-dependent and cannot be detected by content hashing alone; this
mirrors the existing exception already present in the `apply()` early-
return guard.1 parent cc3257d commit 8135dd0
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
398 | 403 | | |
399 | 404 | | |
400 | 405 | | |
401 | 406 | | |
| 407 | + | |
| 408 | + | |
402 | 409 | | |
403 | 410 | | |
0 commit comments