Skip to content

Commit

Permalink
Fix #948 (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein authored Aug 20, 2024
1 parent 97b337c commit a30cdc9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ WATCHDOG_EMAIL_RECIPIENTS=<target email address>
# Set maximum number of CPUs to use, with a default of half the available total
MAX_N_CPU=<integer number of CPUs>
# Set whether to store images in cache, with a default of true
USE_WINTER_CACHE=<boolean>
USE_MIRAR_CACHE=<boolean>
11 changes: 10 additions & 1 deletion mirar/data/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@

logger = logging.getLogger(__name__)

USE_CACHE: bool = os.getenv("USE_WINTER_CACHE", "true") in ["true", "True", True]
USE_CACHE: bool = os.getenv("USE_MIRAR_CACHE", "true") in ["true", "True", True]

if not USE_CACHE:
if os.getenv("USE_WINTER_CACHE") is not None:
logger.warning(
"The environment variable 'USE_WINTER_CACHE' is deprecated. "
"Please use 'USE_MIRAR_CACHE' instead. "
"This will be removed in a future version."
)
USE_CACHE = os.getenv("USE_WINTER_CACHE") in ["true", "True", True]


class CacheError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion mirar/data/image_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
.. code-block:: bash
export USE_WINTER_CACHE = false
export USE_MIRAR_CACHE = false
See :doc:`usage` for more information about selecting cache mode,
and setting the output data directory.
Expand Down

0 comments on commit a30cdc9

Please sign in to comment.