django-q2 icon indicating copy to clipboard operation
django-q2 copied to clipboard

Add google cloud pubsub broker

Open mkay849 opened this issue 1 year ago • 2 comments

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

mkay849 avatar Dec 19 '23 12:12 mkay849

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 Coverage Status
Change from base Build 7210739519: -2.4%
Covered Lines: 3343
Relevant Lines: 3821

💛 - Coveralls

coveralls avatar Dec 19 '23 16:12 coveralls

Thanks for the PR. I will have some time next week to look at this.

GDay avatar Dec 28 '23 21:12 GDay