Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local development with Cloud Tasks & Cloud Datastore with GAE with Python3

Context:- We are using GAE with Python3 and so GAE APIs package isn't available so we are using google-cloud-* packages for interacting with GAE services

i.e. google-cloud-tasks for push queues, google-cloud-datastore for datastore.

Problem:- There is no way to test things in development environment as google-cloud-* packages directly act on production services.
i.e. if I push a task using google-cloud-tasks it would push in production queue, similarly if I create or update an entity from development environment it would be updating entity in production datastore.

Earlier with GAE APIs packages in local system it used to have local cloud tasks and datastore for development purpose.

I see it as a big and very common issue, I wonder if someone else as well faced such issue and found any solution to this.

like image 822
vinit payal Avatar asked Dec 18 '18 03:12

vinit payal


People also ask

What is Cloud Tasks?

Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch, and delivery of a large number of distributed tasks. Using Cloud Tasks, you can perform work asynchronously outside of a user or service-to-service request.


1 Answers

For Cloud Datastore you can follow the instructions at https://cloud.google.com/datastore/docs/tools/datastore-emulator to use the local emulator instead of your production Datastore database.

As noted in https://cloud.google.com/tasks/docs/migrating, Cloud Tasks is not currently supported in an emulator.

like image 193
Jim Morrison Avatar answered Oct 11 '22 03:10

Jim Morrison