Skip to content

Commit

Permalink
Use a more dedicated name to get the service URL
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodaher committed Feb 5, 2021
1 parent bcfd9f3 commit 08f97ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The following APIs must be enabled in your project(s):

## How it works

> Add ``GOOGLE_CLOUD_TASKS_ENDPOINT`` to your Django settings or as an environment variable
![image](https://user-images.githubusercontent.com/9717144/100749131-00cce780-33c3-11eb-8f2a-b465bc0a45bb.png)

## Setup
Expand Down
2 changes: 1 addition & 1 deletion django_cloud_tasks/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, *args, **kwargs):
self.on_demand_tasks = {}
self.periodic_tasks = {}
self.subscriber_tasks = {}
self.domain = self._fetch_config(name='DOMAIN_URL', default='http://localhost:8080')
self.domain = self._fetch_config(name='GOOGLE_CLOUD_TASKS_ENDPOINT', default='http://localhost:8080')

def _fetch_config(self, name, default):
return getattr(settings, name, os.environ.get(name, default))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-google-cloud-tasks"
version = "0.3.6"
version = "0.3.7"
description = "Async Tasks with HTTP endpoints"
authors = ["Joao Daher <[email protected]>"]
packages = [
Expand Down

0 comments on commit 08f97ff

Please sign in to comment.