knox / Windmill-6.sh
0 likes
0 forks
1 files
Last active
1 | cargo install sqlx-cli |
2 | env DATABASE_URL=<YOUR_DATABASE_URL> sqlx migrate run |
knox / Windmill-5.sh
0 likes
0 forks
1 files
Last active
1 | npm run generate-backend-client |
2 | ## on mac use |
3 | npm run generate-backend-client-mac |
knox / Windmill-4.md
0 likes
0 forks
1 files
Last active
Environment Variable name | Default | Description | Api Server/Worker/All |
---|---|---|---|
DATABASE_URL | The Postgres database url. | All | |
WORKER_GROUP | default | The worker group the worker belongs to and get its configuration pulled from | Worker |
MODE | standalone | The mode if the binary. Possible values: standalone, worker, server | All |
METRICS_ADDR | None | (ee only) The socket addr at which to expose Prometheus metrics at the /metrics path. Set to "true" to expose it on port 8001 | All |
JSON_FMT | false | Output the logs in json format instead of logfmt | All |
BASE_URL | http://localhost:8000 | The base url that is exposed publicly to access your instance. Is overriden by the instance settings if any. | Server |
SCRIPT_TOKEN_EXPIRY | 900 | The default duration period of the ephemeral-token generated at the beginning of a script | Worker |
ZOMBIE_JOB_TIMEOUT | 30 | The timeout after which a job is considered to be zombie if the worker did not send pings about processing the job (every server check for zombie jobs every 30s) | Server |
knox / Windmill-3.sh
0 likes
0 forks
1 files
Last active
1 | BINARY_NAME='windmill-amd64' # or windmill-ee-amd64 for the enterprise edition |
2 | LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/windmill-labs/windmill/releases/latest) |
3 | LATEST_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') |
4 | ARTIFACT_URL="https://github.com/windmill-labs/windmill/releases/download/$LATEST_VERSION/$BINARY_NAME" |
5 | wget "$ARTIFACT_URL" -O windmill |
knox / Windmill-2.sh
0 likes
0 forks
1 files
Last active
1 | curl https://raw.githubusercontent.com/windmill-labs/windmill/main/docker-compose.yml -o docker-compose.yml |
2 | curl https://raw.githubusercontent.com/windmill-labs/windmill/main/Caddyfile -o Caddyfile |
3 | curl https://raw.githubusercontent.com/windmill-labs/windmill/main/.env -o .env |
4 | |
5 | docker compose up -d |
knox / Windmill-1.ts
0 likes
0 forks
1 files
Last active
1 | //import any dependency from npm |
2 | import * as wmill from "windmill-client" |
3 | import * as cowsay from 'cowsay@1.5.0'; |
4 | |
5 | // fill the type, or use the +Resource type to get a type-safe reference to a resource |
6 | type Postgresql = { |
7 | host: string; |
8 | port: number; |
9 | user: string; |
10 | dbname: string; |
knox / yfinance-12.py
0 likes
0 forks
1 files
Last active
1 | import yfinance as yf |
2 | yf.set_tz_cache_location("custom/cache/location") |
3 | ... |
knox / yfinance-11.py
0 likes
0 forks
1 files
Last active
1 | from requests import Session |
2 | from requests_cache import CacheMixin, SQLiteCache |
3 | from requests_ratelimiter import LimiterMixin, MemoryQueueBucket |
4 | from pyrate_limiter import Duration, RequestRate, Limiter |
5 | class CachedLimiterSession(CacheMixin, LimiterMixin, Session): |
6 | pass |
7 | |
8 | session = CachedLimiterSession( |
9 | limiter=Limiter(RequestRate(2, Duration.SECOND*5)), # max 2 requests per 5 seconds |
10 | bucket_class=MemoryQueueBucket, |