https://cloud.google.com/tasks/docs/add-task-queue?hl=ja
-- 1. 前作業
gcloud init
gcloud auth list
gcloud --version
gcloud projects create project01-9999999 \
--name="project01"
gcloud config list
gcloud config set project project01-9999999
gcloud config set compute/region asia-northeast1 --quiet
gcloud config set compute/zone asia-northeast1-a --quiet
gcloud beta billing accounts list
gcloud beta billing projects link project01-9999999 --billing-account=111111-111111-111111
gcloud services enable compute.googleapis.com --project project01-9999999
gcloud components update
-- 2. App Engine デプロイ
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
cd python-docs-samples/appengine/flexible/tasks/
pip3 install -r requirements.txt
gcloud app deploy
gcloud app describe
gcloud app browse
curl https://project01-9999999.an.r.appspot.com
-- 3. Cloud Tasks キューを作成する
gcloud tasks queues create queue01
gcloud tasks queues list
gcloud tasks queues describe queue01
-- 4. Cloud Tasks キューにタスクを追加する
export PROJECT_ID=project01-9999999
export LOCATION_ID=asia-northeast1
export QUEUE_ID=queue01
python3 create_app_engine_queue_task.py \
--project=$PROJECT_ID \
--location=$LOCATION_ID \
--queue=$QUEUE_ID \
--payload=hello
gcloud app logs read
-- 5. クリーンアップ
gcloud tasks queues delete queue01 \
--quiet
gcloud projects list
gcloud projects delete project01-9999999 \
--quiet