Skip to content

Commit

Permalink
update endpoint and env var
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch committed Jul 16, 2018
1 parent 939c5c7 commit 6181758
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions appengine-java8/tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Set environment variables:
First, your project ID:

```
export PROJECT_ID=my-project-id
export GOOGLE_CLOUD_PROJECT=my-project-id
```

Then the queue ID, as specified at queue creation time. Queue IDs already
Expand All @@ -81,11 +81,11 @@ location is "us-central1").
export LOCATION_ID=us-central1
```

Create a task, targeted at the `log_payload` endpoint, with a payload specified:
Create a task, targeted at the `/tasks/create` endpoint, with a payload specified:

```
mvn exec:java -Dexec.mainClass="com.example.task.CreateTask" \
-Dexec.args="--project-id $PROJECT_ID --queue $QUEUE_ID --location $LOCATION_ID --payload hello"
-Dexec.args="--project-id $GOOGLE_CLOUD_PROJECT --queue $QUEUE_ID --location $LOCATION_ID --payload hello"
```

The App Engine app serves as a target for the push requests. It has an
Expand All @@ -101,5 +101,5 @@ Create a task that will be scheduled for a time in the future using the

```
mvn exec:java -Dexec.mainClass="com.example.task.CreateTask" \
-Dexec.args="--project-id $PROJECT_ID --queue $QUEUE_ID --location $LOCATION_ID --payload hello --in-seconds 30"
-Dexec.args="--project-id $GOOGLE_CLOUD_PROJECT --queue $QUEUE_ID --location $LOCATION_ID --payload hello --in-seconds 30"
```
6 changes: 3 additions & 3 deletions tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mvn clean assembly:single
Optionally, you can set up your settings as environment variables:

```
export PROJECT_ID=<YOUR_PROJECT_ID>
export GOOGLE_CLOUD_PROJECT=<YOUR_PROJECT_ID>
export LOCATION_ID=<YOUR_ZONE>
export QUEUE_ID=<YOUR_QUEUE_NAME>
```
Expand All @@ -52,13 +52,13 @@ Next, create a task for a queue:

```
mvn exec:java -Dexec.mainClass="com.example.Quickstart" \
-Dexec.args="create-task --project $PROJECT_ID --queue $QUEUE_ID --location $LOCATION_ID"
-Dexec.args="create-task --project $GOOGLE_CLOUD_PROJECT --queue $QUEUE_ID --location $LOCATION_ID"
```

Finally, pull and acknowledge a task:

```
mvn exec:java -Dexec.mainClass="com.example.task.Quickstart" \
-Dexec.args="lease-and-ack-task --project $PROJECT_ID --queue $QUEUE_ID --location $LOCATION_ID"
-Dexec.args="lease-and-ack-task --project $GOOGLE_CLOUD_PROJECT --queue $QUEUE_ID --location $LOCATION_ID"
```
Note that usually, there would be a processing step in between pulling a task and acknowledging it.

0 comments on commit 6181758

Please sign in to comment.