Skip to content

Commit

Permalink
Modify: unnecessary comment remove
Browse files Browse the repository at this point in the history
  • Loading branch information
yangahh committed Apr 19, 2021
1 parent 7eeb823 commit b97daa3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions api/hub/management/commands/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from apscheduler.triggers.cron import CronTrigger
from apscheduler.events import EVENT_JOB_ERROR, EVENT_JOB_EXECUTED
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
#from django_apscheduler.jobstores import DjangoJobStore
from django_apscheduler.models import DjangoJobExecution
from django.conf import settings
from django.core.management.base import BaseCommand
Expand All @@ -34,13 +33,11 @@
settings.DATABASES['default']['PASSWORD'] + '@' + \
settings.DATABASES['default']['HOST'] + '/' + \
settings.DATABASES['default']['NAME']
#jobstores = {'default': SQLAlchemyJobStore(url=mysql_url)}
__configure = {
'apscheduler.standalone': True,
'apscheduler.jobstores.sqlalchemy_store.class': SQLAlchemyJobStore,
'apscheduler.jobstores.sqlalchemy_store.engine': create_engine(mysql_url, pool_pre_ping=True)
}
#scheduler = BlockingScheduler(timezone=settings.TIME_ZONE, jobstores=jobstores)
scheduler = BlockingScheduler(timezone=settings.TIME_ZONE)
scheduler.configure(__configure)

Expand Down Expand Up @@ -209,7 +206,6 @@ def listener(event):

class Command(BaseCommand):
def handle(self,*args, **options):
#scheduler.add_jobstore(DjangoJobStore(),'default')
scheduler.add_listener(listener, EVENT_JOB_EXECUTED | EVENT_JOB_ERROR)

scheduler.add_job(
Expand Down

0 comments on commit b97daa3

Please sign in to comment.