3

I can't get dev_appserver.py to recognize the custom queues I create using queue.yaml. They don't appear in http://localhost:8000/taskqueue, and when I try to add a task to them I get UnknownQueueError. It works fine in the production environment.

I'm using python 2.7 on Windows 10.

queue.yaml

total_storage_limit: 5G
queue:
- name: not-queue-a
  bucket_size: 500
  rate: 10/s
  retry_parameters:
  task_retry_limit: 2
  min_backoff_seconds: 10
  target: msnot
- name: ui-worker
  target: msbui
  bucket_size: 200
  rate: 1/s
  retry_parameters:
  task_retry_limit: 4
  min_backoff_seconds: 1

My project structure is like this:

    |-- root
        |-- queue.yaml
        |-- index.yaml
        |-- dispatch.yaml
        |-- cron.yaml
        |-- microservice1
            |-- app.yaml
            |-- microservice1.py
        |-- microservice2
            |-- app.yaml
            |-- microservice1.py
        |-- microservice3
            |-- app.yaml
            |-- microservice3.py
        |-- microservice4
            |-- app.yaml
            |-- microservice4.py

I tried adding a copy of queue.yaml to the microservice-subfolders, but I still had the same issue. I've also restarted dev_appserver.py several times.

1 Answers1

2

I had the same problem when I split my app into several services, the dev_appserver.py didn't quite catch up with the multi-services app. I worked around it by symlinking the queue.yaml file inside each of the services:

    |-- microservice1
        |-- app.yaml            
        |-- microservice1.py
        |-- queue.yaml -> ../queue.yaml

It might only be required for the default service, but I'm not entirely sure of this, I didn't try it.

Note: I applied a similar approach for other app-level config files. See also Can a default service/module in a Google App Engine app be a sibling of a non-default one in terms of folder structure?

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • I had to copy the queue.yaml to the default service for testing, but it did work in just default so far. – Kelly Dec 18 '20 at 19:43