0
votes

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:

  1. 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),...
    
  2. 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
    
  3. I can open http://localhost:8000/datastore and see some created data.
  4. I can open http://localhost:8000/taskqueue and see the only one default push queue. No tools to add new queues here.

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.

1
If the queue.yaml file is side-by-side with your app.yaml file the development server should detect it automatically (at least it does for python). If it's not in that place move it (or symlink it) there.Dan Cornilescu
It works now. Thank you!joker512
@joker512 May I ask you to post the solution as an answer?gr7
@GonçaloAlbino Done!joker512

1 Answers

1
votes

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.