Corre python -m bot.outcomes a las 00:30 UTC (tras metrics-retention a las 00:10): resoluciones UMA-finales de Gamma -> market_outcomes + reporte de calibración. Solo-análisis: no toca tablas de trading. Idempotente por market_id, seguro relanzarlo a mano. Misma imagen del bot; CI bumpa el tag (cambio correspondiente en polymarket-bot/.gitea/workflows/ci.yml). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
47 lines
1.8 KiB
YAML
47 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 * * *"
|
|
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
|