Files
k8s-manifests/polymarket-bot/cronjob-outcomes.yaml
T
chemavx dd10f26f31 decommission(F3): suspender cronjobs metrics-retention y outcomes-joiner
Sin bot ni postgres ya no hay nada que retener ni joinear; suspend en vez
de borrar para conservar la definición durante la semana de gracia.
2026-07-06 12:19:33 +00:00

48 lines
1.8 KiB
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: outcomes-joiner
namespace: polymarket-bot
spec:
# Daily at 00:30 UTC (after metrics-retention at 00:10, no overlap): fetch
# UMA-final resolutions for archived markets from the Gamma API into
# market_outcomes, then print the calibration report (Brier/log-loss of the
# model vs the market price). Replay R2 joiner — analysis only: reads the
# signals archive, writes only market_outcomes, never touches trading
# tables. Safe to also run by hand any time (kubectl create job --from=...):
# the upsert is idempotent per market_id (ON CONFLICT DO UPDATE) and the
# fetch only queries markets that still lack an outcome.
schedule: "30 0 * * *"
suspend: true
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 2
# A hung Gamma call must not block tomorrow's run through Forbid
activeDeadlineSeconds: 900
template:
spec:
restartPolicy: OnFailure
imagePullSecrets:
- name: gitea-registry-infisical
containers:
- name: outcomes
# Same image as the bot deployment; CI bumps this tag on every
# bot image build (see polymarket-bot repo .gitea/workflows/ci.yml)
image: git.chemavx.xyz/chemavx/polymarket-bot:2b326ad5
imagePullPolicy: Always
command: ["python3", "-m", "bot.outcomes"]
envFrom:
- secretRef:
name: bot-secrets-infisical
- configMapRef:
name: bot-config
resources:
requests:
cpu: 25m
memory: 64Mi
limits:
memory: 256Mi