mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: script
This commit is contained in:
1 parent
505f74aa26
commit
8c8867280b
2 files changed
+37
-2
No files matched your search
@@ -0,0 +1,33 @@
|
||||
name: CD Averages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: dev
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 12 * * 0'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build averages
|
||||
run: |
|
||||
GH_TOKEN=${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL=${{ secrets.DATABASE_URL }}
|
||||
VIDEOS_SHEET=${{ secrets.VIDEOS_SHEET }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
|
||||
bun scripts/averages.ts
|
||||
+4
-2
@@ -16,7 +16,7 @@ import { superCompress } from '../src/core/blitzkit/superCompress';
|
||||
import { DidsReadStream, DidsWriteStream } from '../src/core/streams/dids';
|
||||
import { IndividualTankStats } from '../src/types/tanksStats';
|
||||
|
||||
const RUN_TIME = 1000 * 0;
|
||||
const RUN_TIME = 1000 * 60 * 60;
|
||||
const MAX_REQUESTS = 10;
|
||||
|
||||
const production = argv.includes('--production');
|
||||
@@ -124,7 +124,9 @@ function discover() {
|
||||
discoveredIds.push(id);
|
||||
players.push(stats);
|
||||
|
||||
console.log(`discovered ${id} in ${region}`);
|
||||
console.log(
|
||||
`discovered ${id} in ${region} (time left: ${RUN_TIME - (Date.now() - startTime)}ms)`,
|
||||
);
|
||||
}
|
||||
|
||||
setTimeout(chainDiscovery); // circumvent max call stack
|
||||
|
||||
Reference in new issue
Block a user