mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-14 04:05:31 +00:00
reference-cache-integrity-fix-2 (#1645)
* delete from process caller table explicitly before removing from reference cache to hopefully avoid integrity errors * check if reference cache id list has items to avoid unnecessary db calls --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com> Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
This commit is contained in:
parent
be68db52ba
commit
2992798c5b
@ -20,6 +20,7 @@ class ProcessCallerService:
|
||||
|
||||
@staticmethod
|
||||
def clear_cache_for_process_ids(reference_cache_ids: list[int]) -> None:
|
||||
if len(reference_cache_ids) > 0:
|
||||
# query-invoked autoflush happens here
|
||||
ProcessCallerRelationshipModel.query.filter(
|
||||
or_(
|
||||
|
@ -276,6 +276,10 @@ class SpecFileService(FileSystemService):
|
||||
reference_cache_ids = []
|
||||
for record in records:
|
||||
reference_cache_ids.append(record.id)
|
||||
|
||||
ProcessCallerService.clear_cache_for_process_ids(reference_cache_ids)
|
||||
|
||||
for record in records:
|
||||
db.session.delete(record)
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user