This repository was archived by the owner on Feb 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-22
lines changed
samples/appengine/flexible/tasks Expand file tree Collapse file tree 3 files changed +18
-22
lines changed Original file line number Diff line number Diff line change
1
+ # Use the official Python image.
2
+ # https://hub.docker.com/_/python
3
+ FROM python:3.7
4
+
5
+ # Copy local code to the container image.
6
+ ENV APP_HOME /app
7
+ WORKDIR $APP_HOME
8
+ COPY . .
9
+
10
+ # Install production dependencies.
11
+ RUN pip install Flask gunicorn
12
+
13
+ # Run the web service on container startup. Here we use the gunicorn
14
+ # webserver, with one worker process and 8 threads.
15
+ # For environments with multiple CPU cores, increase the number of workers
16
+ # to be equal to the cores available.
17
+ CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 main:app
Original file line number Diff line number Diff line change @@ -101,24 +101,3 @@ endpoint, with a payload specified:
101
101
```
102
102
python create_app_engine_queue_task.py --project=$PROJECT_ID --queue=$QUEUE_ID --location=$LOCATION_ID --payload=hello
103
103
```
104
-
105
- ### Using HTTP Push Queues
106
-
107
- Set an environment variable for the endpoint to your task handler. This is an
108
- example url to send requests to the App Engine task handler:
109
- ```
110
- export URL=https://<project_id>.appspot.com/example_task_handler
111
- ```
112
-
113
- Running the sample will create a task and send the task to the specific URL
114
- endpoint, with a payload specified:
115
-
116
- ```
117
- python create_http_task.py --project=$PROJECT_ID --queue=$QUEUE_ID --location=$LOCATION_ID --url=$URL --payload=hello
118
- ```
119
-
120
- Now view that the payload was received and verify the payload:
121
-
122
- ```
123
- gcloud app logs read
124
- ```
Original file line number Diff line number Diff line change 1
1
Flask == 1.0.2
2
2
gunicorn == 19.9.0
3
- google-cloud-tasks == 0.6 .0
3
+ google-cloud-tasks == 0.7 .0
You can’t perform that action at this time.
0 commit comments