I need to start my google app engine project locally. It works normally on google server, but debugging becomes a pain, since deployment on each fix takes a lot of time. I've almost managed to start it locally, but I don't understand how to create queues, which are necessary. My steps:
run dev_appserver.py app.yaml
, following using local development server guide. All works fine except of queues:
_, err := taskqueue.Add(u.Ctx(), task, queueName)
exceptions.ThrowIfErr(true, "err_msg", err)
Throws
Panic! UserMessage: <err_msg>, Error: API error 1 (taskqueue: UNKNOWN_QUEUE),...
I can easily create queues on remote server (using creating push and creating pull guides):
gcloud app deploy queue.yaml
For queue.yaml
:
queue:
- name: Pull-Data-Queue
mode: pull
- name: Push-Data-Queue
mode: push
rate: 1/s
Google guide says queues can't be created dynamically from code, only by yaml or xml. But how to create them in local environment. Is it even possible? gcloud app deploy queue.yaml
works only for remote deployment as far as I understand.
If the queue.yaml
file is side-by-side with the app.yaml
file the development server detects it automatically. It is possible to use symlink instead of copying. It fixed the problem.