Skip to content

Commit

Permalink
Merge pull request #1472 from expectedparrot/cache_message
Browse files Browse the repository at this point in the history
Commenting out cache messages
  • Loading branch information
johnjosephhorton authored Jan 10, 2025
2 parents 801e706 + c9a5b25 commit a4110ed
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions edsl/data/RemoteCacheSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ def _sync_from_remote(self) -> None:
missing_count = len(diff.client_missing_entries)

if missing_count == 0:
self._output("No new entries to add to local cache.")
# self._output("No new entries to add to local cache.")
return

self._output(
f"Updating local cache with {missing_count:,} new "
f"{'entry' if missing_count == 1 else 'entries'} from remote..."
)
# self._output(
# f"Updating local cache with {missing_count:,} new "
# f"{'entry' if missing_count == 1 else 'entries'} from remote..."
# )

self.cache.add_from_dict(
{entry.key: entry for entry in diff.client_missing_entries}
)
self._output("Local cache updated!")
# self._output("Local cache updated!")

def _get_entries_to_upload(self, diff: CacheDifference) -> CacheEntriesList:
"""Determines which entries need to be uploaded to remote cache."""
Expand Down Expand Up @@ -154,23 +154,23 @@ def _sync_to_remote(self) -> None:
upload_count = len(entries_to_upload)

if upload_count > 0:
self._output(
f"Updating remote cache with {upload_count:,} new "
f"{'entry' if upload_count == 1 else 'entries'}..."
)
# self._output(
# f"Updating remote cache with {upload_count:,} new "
# f"{'entry' if upload_count == 1 else 'entries'}..."
# )

self.coop.remote_cache_create_many(
entries_to_upload,
visibility="private",
description=self.remote_cache_description,
)
self._output("Remote cache updated!")
else:
self._output("No new entries to add to remote cache.")
# self._output("Remote cache updated!")
# else:
# self._output("No new entries to add to remote cache.")

self._output(
f"There are {len(self.cache.keys()):,} entries in the local cache."
)
# self._output(
# f"There are {len(self.cache.keys()):,} entries in the local cache."
# )


if __name__ == "__main__":
Expand Down

0 comments on commit a4110ed

Please sign in to comment.