facce5dbb5
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-3 Pipeline was successful
ci/woodpecker/push/build-1 Pipeline was successful
ci/woodpecker/push/build-2 Pipeline was successful
ci/woodpecker/push/finalize Pipeline was successful
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled
Prevents accumulation of completed/failed verification jobs. - ttlSecondsAfterFinished: 3600 (auto-cleanup after 1h) - backoffLimit: 0 (no retries on intentional market-hours failure)
41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: AnalysisTemplate
|
|
metadata:
|
|
name: market-hours-check
|
|
namespace: stonks-oracle
|
|
spec:
|
|
metrics:
|
|
- name: outside-market-hours
|
|
provider:
|
|
job:
|
|
spec:
|
|
ttlSecondsAfterFinished: 3600
|
|
backoffLimit: 0
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: check
|
|
image: alpine:3.19
|
|
command: [sh, -c]
|
|
args:
|
|
- |
|
|
apk add --no-cache tzdata
|
|
export TZ=America/New_York
|
|
DOW=$(date +%u) # 1=Mon, 7=Sun
|
|
HOUR=$(date +%H)
|
|
MIN=$(date +%M)
|
|
TIME_MIN=$((HOUR * 60 + MIN))
|
|
MARKET_OPEN=570 # 09:30
|
|
MARKET_CLOSE=960 # 16:00
|
|
if [ "$DOW" -ge 6 ]; then
|
|
echo "Weekend — promotions allowed"
|
|
exit 0
|
|
fi
|
|
if [ "$TIME_MIN" -lt "$MARKET_OPEN" ] || [ "$TIME_MIN" -ge "$MARKET_CLOSE" ]; then
|
|
echo "Outside market hours — promotions allowed"
|
|
exit 0
|
|
fi
|
|
echo "Market hours active ($(date)) — promotion blocked"
|
|
exit 1
|
|
restartPolicy: Never
|