Skip to content

Commit 3542910

Browse files
committed
feat: Implement Win Tracker and Overnight Enrichment pipeline
- Added 'overnight-edge-enrichment/win_tracker' cloud function to track signal performance and auto-post wins to X. - Added 'overnight-edge-enrichment/main.py' for the enrichment trigger logic. - Configured deployment scripts and requirements.
1 parent 70d1d45 commit 3542910

6 files changed

Lines changed: 937 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# Deploy enrichment trigger to profitscout-fida8
3+
# Run from overnight-edge-enrichment/ directory
4+
5+
set -e
6+
7+
PROJECT="profitscout-fida8"
8+
REGION="us-central1"
9+
FUNCTION_NAME="enrichment_trigger"
10+
11+
echo "Deploying $FUNCTION_NAME to $PROJECT..."
12+
13+
gcloud functions deploy $FUNCTION_NAME \
14+
--project=$PROJECT \
15+
--region=$REGION \
16+
--runtime=python312 \
17+
--trigger-http \
18+
--allow-unauthenticated \
19+
--entry-point=enrichment_trigger \
20+
--source=. \
21+
--memory=1024MB \
22+
--timeout=540s \
23+
--set-env-vars="PROJECT_ID=$PROJECT,DATASET=profit_scout,GCS_BUCKET=profit-scout-data" \
24+
--set-secrets="POLYGON_API_KEY=POLYGON_API_KEY:latest"
25+
26+
echo ""
27+
echo "✅ Deployed! Test with:"
28+
echo "curl https://$REGION-$PROJECT.cloudfunctions.net/$FUNCTION_NAME"
29+
echo ""
30+
echo "Next: Add Cloud Scheduler trigger for 4:25 AM EST daily:"
31+
echo "gcloud scheduler jobs create http overnight-enrichment \\"
32+
echo " --project=$PROJECT \\"
33+
echo " --location=$REGION \\"
34+
echo " --schedule='25 9 * * 1-5' \\"
35+
echo " --time-zone='UTC' \\"
36+
echo " --uri='https://$REGION-$PROJECT.cloudfunctions.net/$FUNCTION_NAME' \\"
37+
echo " --http-method=POST"

0 commit comments

Comments
 (0)