Skip to content

Commit

Permalink
Correctly clear redis cache on data restart
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Dec 18, 2023
1 parent 53b9f20 commit e4b21ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ All notable changes to this project are documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`_.


==========
Unreleased
==========

Fix
---
- Correctly clear ``Redis`` cache on data restart


===================
38.2.0 - 2023-12-15
===================
Expand Down
3 changes: 2 additions & 1 deletion resolwe/flow/models/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ def reset_data(data: Data):
from resolwe.flow.managers.listener.listener import cache_manager

# Clear the Redis cache for objects to be restarted.
cache_manager.clear(Data, to_process.keys())
for data_id in to_process.keys():
cache_manager.clear(Data, (data_id,))

# Evaluate lazy generator by listing it.
list(map(reset_data, to_process.values()))
Expand Down

0 comments on commit e4b21ad

Please sign in to comment.