A flow language for botrun
Project description
botrun_flow_lang
安裝
- 用 poetry 管理 python 環境
輸出可用的 requirements.txt
poetry export -f requirements.txt --output requirements.txt --without-hashes --without-urls
建立 dev 的 index
gcloud firestore indexes composite create \
--collection-group=botrun-hatch-dev-hatch \
--field-config=field-path=user_id,order=ascending \
--field-config=field-path=name,order=ascending \
--field-config=field-path=__name__,order=ascending \
--project=scoop-386004
打包 dev
gcloud builds submit --config cloudbuild_fastapi_dev.yaml --project=scoop-386004
deploy cloud run, dev 的版本
gcloud run deploy botrun-flow-lang-fastapi-dev \
--image asia-east1-docker.pkg.dev/scoop-386004/botrun-flow-lang/botrun-flow-lang-fastapi-dev \
--port 8080 \
--platform managed \
--allow-unauthenticated \
--project=scoop-386004 \
--region=asia-east1 \
--cpu 2 \
--memory 8Gi \
--min-instances 0 \
--max-instances 5 \
--timeout 3600s \
--concurrency 300 \
--cpu-boost \
建立 staging 的 index
gcloud firestore indexes composite create \
--collection-group=botrun-hatch-hatch \
--field-config=field-path=user_id,order=ascending \
--field-config=field-path=name,order=ascending \
--field-config=field-path=__name__,order=ascending \
--project=scoop-386004
打包 Cloud Run, staging 的版本
gcloud builds submit --config cloudbuild_fastapi.yaml --project=scoop-386004
佈署 cloud run, staging 的版本
gcloud run deploy botrun-flow-lang-fastapi \
--image asia-east1-docker.pkg.dev/scoop-386004/botrun-flow-lang/botrun-flow-lang-fastapi \
--port 8080 \
--platform managed \
--allow-unauthenticated \
--project=scoop-386004 \
--region=asia-east1 \
--cpu 2 \
--memory 8Gi \
--min-instances 0 \
--max-instances 5 \
--timeout 3600s \
--concurrency 300 \
--cpu-boost \
為了要減少冷啟動的時間,每十分鐘呼叫一次 heartbeat
gcloud scheduler jobs create http botrun-flow-lang-heartbeat-job-$ENV \
--schedule "*/10 * * * *" \
--time-zone "Asia/Taipei" \
--uri "https://botrun-flow-lang-fastapi-$ENV-36186877499.asia-east1.run.app/heartbeat" \
--http-method GET \
--location "asia-east1" \
--project "scoop-386004"
測試 scheduler
gcloud scheduler jobs run botrun-flow-lang-heartbeat-job-$ENV --location "asia-east1" --project "scoop-386004"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for botrun_flow_lang-4.10.261.tar.gz
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 0069809199bc1d073bb93e82300909e5b06cbf2e71352d5740f1b2fb44f79e81 |
|
| MD5 | 89fbc7e618cca87acb35f1e6d65426ba |
|
| BLAKE2b-256 | e700c7c390b9a15638de4763c4dc6fb6fc62a4288d3c786a6804dd3f8fc0f827 |
Close
Hashes for botrun_flow_lang-4.10.261-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 280aaf1a2685d72f9207c77ecbb06087dea5d3d7b548b1d8f4f31387156e376a |
|
| MD5 | fdb10776e3bbf2ed3b3048120a987e4d |
|
| BLAKE2b-256 | 58dfbe606ded4f0a545345e52c65373a85250ca94e6998490d4452d23f9710fd |