Skip to content

Commit

Permalink
adding to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed May 7, 2024
1 parent 874505a commit 790396a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,31 @@ services:
- SQS_QUEUE=my-aws-queue
- SQS_REGION=us-west-1
```
### Notes on Google PubSub
TaskQueue will try to connect to pubsub using the credentials it finds at ~/.cloudvolume/secrets/google-secret.json
You must first make both a topic and a subscription that is subscribed to that topic.
```
gcloud pubsub topics create TASKQUEUE_TEST_TOPIC
gcloud pubsub subscriptions create TASKQUEUE_TEST_SUBSCRIPTION --topic TASKQUEUE_TEST_TOPIC
```

Then you can specify a taskqueue using this url format

```python
queue_url = "pubsub://projects/seung-lab/topics/TASKQUEUE_TEST_TOPIC/subscriptions/TASKQUEUE_TEST_SUBSCRIPTION"

tq = TaskQueue(queue_url)
```
Note that Google PubSub doesn't have all the same features as Amazon SQS, including statistics reporting, and so some features do not function properly with this backend.

Also, google pubsub libraries are not installed by default and so if you want to use this backend install with the pubsub option

```
pip install task-queue[pubsub]
```


### Notes on File Queue

Expand Down

0 comments on commit 790396a

Please sign in to comment.