Skip to content
Snippets Groups Projects
Commit afba2f62 authored by Max Drexler's avatar Max Drexler
Browse files

Merge branch 'main' of gitlab.ssec.wisc.edu:mdrexler/grib_rmq_stream

parents 8d211670 7c14eb0b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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",
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment