43 lines
934 B
Markdown
43 lines
934 B
Markdown
# chatapp-cron
|
|
|
|
Standalone cron workers for chatapp activities.
|
|
|
|
Current worker:
|
|
- `week-star-job`: specified-gift weekly rank settlement and reward dispatch
|
|
|
|
Local run:
|
|
|
|
```bash
|
|
cd /Users/hy/Documents/hy/chatapp-cron
|
|
go mod tidy
|
|
go run ./cmd/week-star-job
|
|
```
|
|
|
|
Production deploy:
|
|
|
|
```bash
|
|
cd /Users/hy/Documents/hy/chatapp3/chatapp3-deploy
|
|
./deploy.sh -c chatapp-cron
|
|
```
|
|
|
|
Required envs:
|
|
|
|
- `CRON_MYSQL_DSN`
|
|
- `CRON_REDIS_ADDR`
|
|
- `CRON_REDIS_PASSWORD`
|
|
- `CRON_REDIS_DB`
|
|
- `CRON_JAVA_OTHER_BASE_URL`
|
|
- `WEEK_STAR_DEFAULT_SYS_ORIGIN`
|
|
- `WEEK_STAR_TIMEZONE`
|
|
- `WEEK_STAR_SETTLE_INTERVAL_SECONDS`
|
|
|
|
Production topology:
|
|
|
|
- worker host: Singapore `cron-sg-1`
|
|
- dependent MySQL / Redis / Java Other: Riyadh private network
|
|
- network requirement: VPCs must be connected through Tencent Cloud Connect Network before deploy
|
|
|
|
Detailed ops guide:
|
|
|
|
- `/Users/hy/Documents/hy/chatapp3/chatapp3-deploy/tencent-prod/docs/CHATAPP_CRON_DEPLOYMENT.md`
|