Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalidate memcache if a package file has been deleted / moved / etc #376

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/rez/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,17 @@ def _packages_changed(key, data):

new_state = variant_states.get(variant)
if new_state is None:
repo = variant.resource._repository
new_state = repo.get_variant_state_handle(variant.resource)
try:
repo = variant.resource._repository
new_state = repo.get_variant_state_handle(variant.resource)
except (IOError, OSError) as e:
# if, ie a package file was deleted on disk, then
# an IOError or OSError will be raised when we try to
# read from it - assume that the packages have changed!
self._print("Error loading %r (assuming cached state "
"changed): %s", variant.qualified_name,
e)
return True
variant_states[variant] = new_state

if old_state != new_state:
Expand Down