Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cf4615596 | ||
|
|
dd10f26f31 | ||
|
|
0f8bd407f4 | ||
|
|
dc45c913a5 | ||
|
|
abcb38bd6d | ||
|
|
73bf1b6351 | ||
|
|
fea711375e | ||
|
|
8cd40002c8 | ||
|
|
b1b86945c3 | ||
|
|
d0e8eaa001 | ||
|
|
a78de3eacd | ||
|
|
5ef73e6705 |
@@ -3,9 +3,6 @@ kind: Application
|
||||
metadata:
|
||||
name: polymarket-bot
|
||||
namespace: argocd
|
||||
annotations:
|
||||
notifications.argoproj.io/subscribe.on-sync-failed.telegram: "5138407666"
|
||||
notifications.argoproj.io/subscribe.on-health-degraded.telegram: "5138407666"
|
||||
spec:
|
||||
destination:
|
||||
namespace: polymarket-bot
|
||||
|
||||
@@ -11,6 +11,7 @@ spec:
|
||||
# days are dead weight. Today's rows are never touched: the latest one
|
||||
# feeds /api/summary and the close is still evolving.
|
||||
schedule: "10 0 * * *"
|
||||
suspend: true
|
||||
concurrencyPolicy: Forbid
|
||||
successfulJobsHistoryLimit: 3
|
||||
failedJobsHistoryLimit: 3
|
||||
|
||||
@@ -13,6 +13,7 @@ spec:
|
||||
# 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
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
namespace: polymarket-bot
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
replicas: 0
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
namespace: polymarket-bot
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
replicas: 0
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
namespace: polymarket-bot
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
replicas: 0
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: postsync-smoke-test
|
||||
namespace: polymarket-bot
|
||||
annotations:
|
||||
argocd.argoproj.io/hook: PostSync
|
||||
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 600
|
||||
backoffLimit: 0
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: smoke-test
|
||||
image: curlimages/curl:latest
|
||||
env:
|
||||
- name: TELEGRAM_BOT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: telegram-notify-infisical
|
||||
key: TELEGRAM_BOT_TOKEN
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: telegram-notify-infisical
|
||||
key: TELEGRAM_CHAT_ID
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
API="http://api.polymarket-bot.svc.cluster.local:8000"
|
||||
DASH="http://dashboard.polymarket-bot.svc.cluster.local:80"
|
||||
|
||||
notify() {
|
||||
curl -s --max-time 10 -X POST \
|
||||
"https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||
--data-urlencode "text=$1" \
|
||||
> /dev/null || true
|
||||
}
|
||||
|
||||
fail() {
|
||||
notify "[FAIL] polymarket-bot PostSync: $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "--- [1/3] GET /api/summary ---"
|
||||
SUMMARY=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
|
||||
"$API/api/summary") || fail "GET /api/summary unreachable"
|
||||
echo "$SUMMARY"
|
||||
echo "$SUMMARY" | grep -qE '"paper_mode"\s*:\s*true' \
|
||||
|| fail "paper_mode is not true"
|
||||
echo "OK"
|
||||
|
||||
echo "--- [2/3] GET /api/trades?status=open ---"
|
||||
curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
|
||||
"$API/api/trades?status=open" > /dev/null || fail "GET /api/trades unreachable"
|
||||
echo "OK"
|
||||
|
||||
echo "--- [3/3] Dashboard HTTP 200 ---"
|
||||
curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
|
||||
"$DASH/" > /dev/null || fail "dashboard returned non-200"
|
||||
echo "OK"
|
||||
|
||||
notify "[OK] polymarket-bot PostSync passed"
|
||||
echo "=== polymarket-bot: all smoke tests passed ==="
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
whenDeleted: Retain
|
||||
whenScaled: Retain
|
||||
podManagementPolicy: OrderedReady
|
||||
replicas: 1
|
||||
replicas: 0
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: researchowl
|
||||
image: git.chemavx.xyz/chemavx/researchowl:a23810b9
|
||||
image: git.chemavx.xyz/chemavx/researchowl:d31badeb
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: TELEGRAM_BOT_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user