Skip to content
Snippets Groups Projects
Verified Commit 5e250e03 authored by David Hoese's avatar David Hoese
Browse files

Fix midnight check in checkmk script

parent eddb97d4
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ repos: ...@@ -7,7 +7,7 @@ repos:
- id: pre-commit-update - id: pre-commit-update
args: [ --dry-run ] args: [ --dry-run ]
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.12.2' rev: 'v0.12.4'
hooks: hooks:
- id: ruff - id: ruff
args: ["--fix"] args: ["--fix"]
...@@ -20,12 +20,12 @@ repos: ...@@ -20,12 +20,12 @@ repos:
- id: check-yaml - id: check-yaml
args: [--unsafe] args: [--unsafe]
- repo: https://github.com/PyCQA/bandit - repo: https://github.com/PyCQA/bandit
rev: '1.8.5' # Update me! rev: '1.8.6' # Update me!
hooks: hooks:
- id: bandit - id: bandit
args: [--ini, .bandit] args: [--ini, .bandit]
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.16.1' # Use the sha / tag you want to point at rev: 'v1.17.0' # Use the sha / tag you want to point at
hooks: hooks:
- id: mypy - id: mypy
additional_dependencies: additional_dependencies:
......
...@@ -7,8 +7,8 @@ warning_threshold_seconds=900 ...@@ -7,8 +7,8 @@ warning_threshold_seconds=900
base_raw_dir="/data/raw/aoss/ceilo" base_raw_dir="/data/raw/aoss/ceilo"
base_cache_dir="/data/cache/aoss/ceilo" base_cache_dir="/data/cache/aoss/ceilo"
now_seconds=$(date +%s) seconds_since_midnight=$(( $(date '+%-H *3600 + %-M *60 + %-S') ))
if [ $now_seconds -lt $threshold_seconds ]; then if [ $seconds_since_midnight -lt $threshold_seconds ]; then
# we're just after midnight, check yesterday's directory # we're just after midnight, check yesterday's directory
data_file_suffix=$(date -d yesterday +%Y/%m/%d/aoss_ceilo.%Y-%m-%d.ascii) data_file_suffix=$(date -d yesterday +%Y/%m/%d/aoss_ceilo.%Y-%m-%d.ascii)
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment