diff --git a/README.md b/README.md index d4a9d1e02013a24fad59e000897182beaf0062f7..3644dd744e9f9a6d84da9e0bceebd56bc77e9270 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ Currently, this package can only process GRIB2 files, GRIB1 files will be ignore * [NCEPLIBS-g2c](https://github.com/NOAA-EMC/NCEPLIBS-g2c) (`libg2c`) * This is the C library used to read GRIB files. -If `libg2c` is in a "common" installation path (`/usr/local`, `/sw`, `/opt`, `/opt/local`, `/opt/homebrew`, or `/usr`) then you can simply install the package from the GitLab package registry. +If the `lib` folder with `libg2c` is in a "common" installation path (`/usr/local`, `/sw`, `/opt`, `/opt/local`, `/opt/homebrew`, or `/usr`) then you can simply install the package from the GitLab package registry. ```bash python3 -m pip install grib-processor --upgrade --index-url https://gitlab.ssec.wisc.edu/api/v4/projects/2732/packages/pypi/simple ``` -If `libg2c` is on the system, but not in one of the previously listed paths, you can manually tell grib_processer where it is through the `G2C_DIR` environment variable. E.g. `libg2c` is in `/home/user/my_libs/lib/`, install grib_processer as so: +If `lib` folder with `libg2c` is on the system, but not in one of the previously listed paths, you can manually tell grib_processer where it is through the `G2C_DIR` environment variable. E.g. `libg2c` is in `/home/user/my_libs/lib/`, install grib_processer as so: ```bash G2C_DIR=/home/user/my_libs python3 -m pip install grib-processor --upgrade --index-url https://gitlab.ssec.wisc.edu/api/v4/projects/2732/packages/pypi/simple diff --git a/grib_processor/__init__.py b/grib_processor/__init__.py index 2d6f0a5eec5fa208040815530916900c24a7ae86..e827f9cda2e962156fecd232a3b8cde46b32eb9b 100644 --- a/grib_processor/__init__.py +++ b/grib_processor/__init__.py @@ -12,7 +12,7 @@ from grib_processor.utils import grib_file_watch __author__ = "Max Drexler" __email__ = "mndrexler@wisc.edu" -__version__ = "0.0.5" +__version__ = "0.1.0" __all__ = [ "GribPayload", diff --git a/grib_processor/utils.py b/grib_processor/utils.py index 7650600db16f4e42d5b7b3dda98682b1a399ea53..4ca30d3d58881770c0f7ec89e0ca52646df57d34 100644 --- a/grib_processor/utils.py +++ b/grib_processor/utils.py @@ -178,7 +178,7 @@ def realtime(file_iter: Iterable[str]) -> Generator[GribPayload, None, None]: ): LOG.debug("realtime - got msg %s:%d", file, msg_num) yield msg - except (KeyError, OSError): + except Exception: LOG.exception( "realtime - Error processing grib file %s @ msg %d", file, msg_num or 0 ) @@ -189,6 +189,7 @@ def realtime(file_iter: Iterable[str]) -> Generator[GribPayload, None, None]: if time.time() - last_clean_time > CACHE_CLEAN_INTERVAL: LOG.info("realtime - time to clean the cache") _clean_caches(cache) + last_clean_time = time.time() def grib_filter(change: Change, path: str) -> bool: