-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
complete nearby location and filters done
- Loading branch information
1 parent
50f6b40
commit 2ada543
Showing
17 changed files
with
203 additions
and
64 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from apscheduler.schedulers.background import BackgroundScheduler | ||
from apscheduler.schedulers.base import STATE_STOPPED | ||
from django.conf import settings | ||
|
||
scheduler = BackgroundScheduler() | ||
|
||
def startScheduler(): | ||
"""Function to start background Scheduler""" | ||
# print(scheduler.state) | ||
if scheduler.state == STATE_STOPPED: | ||
url = 'postgres://{}:{}@{}:{}/{}'.format( | ||
settings.DATABASES['default']['USER'], | ||
settings.DATABASES['default']['PASSWORD'], | ||
settings.DATABASES['default']['HOST'], | ||
settings.DATABASES['default']['PORT'], | ||
settings.DATABASES['default']['NAME'] | ||
) | ||
scheduler.add_jobstore('sqlalchemy', url=url, tablename="taskstore") | ||
scheduler.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.