django-q2
django-q2 copied to clipboard
Add google cloud pubsub broker
This PR adds a broker that supports google cloud's pubsub message queue service.
All that is required to use this new broker is setting the environment variables
-
GOOGLE_CLOUD_PROJECT
-
GOOGLE_APPLICATION_CREDENTIALS
where GOOGLE_CLOUD_PROJECT
is the name of the GCloud project and GOOGLE_APPLICATION_CREDENTIALS
is the location of the gcloud credentials file (see https://cloud.google.com/docs/authentication/application-default-credentials)
and adding something like
"pubsub": {
"google_cloud_project": os.environ.get("GOOGLE_CLOUD_PROJECT"),
"google_application_credentials": os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"),
},
to the Q_CLUSTER configuration
Pull Request Test Coverage Report for Build 7261908975
- 6 of 108 (5.56%) changed or added relevant lines in 4 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-2.4%) to 87.49%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
django_q/brokers/init.py | 1 | 3 | 33.33% |
django_q/tests/test_brokers.py | 4 | 40 | 10.0% |
django_q/brokers/google_pubsub.py | 0 | 64 | 0.0% |
<!-- | Total: | 6 | 108 |
Totals | |
---|---|
Change from base Build 7210739519: | -2.4% |
Covered Lines: | 3343 |
Relevant Lines: | 3821 |
💛 - Coveralls
Thanks for the PR. I will have some time next week to look at this.