V1.30 notification
This commit is contained in:
@@ -1,19 +1,27 @@
|
||||
from ..mautic import MauticHelper
|
||||
from ..automation.notification import Notification
|
||||
from django_cron import CronJobBase, Schedule
|
||||
import datetime
|
||||
|
||||
|
||||
class MyCronJob(CronJobBase):
|
||||
print(datetime.datetime.now(), " *** START sync customers ")
|
||||
|
||||
RUN_EVERY_MINS = 60
|
||||
|
||||
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
|
||||
code = 'aitrainer_backoffice.controlling.cron' # a unique code
|
||||
print(datetime.datetime.now(), " *** END sync customers ")
|
||||
|
||||
def do(self):
|
||||
print(datetime.datetime.now(), " *** START sync customers ")
|
||||
|
||||
|
||||
class NotificationJob(CronJobBase):
|
||||
notif = Notification()
|
||||
RUN_EVERY_MINS = 60
|
||||
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
|
||||
code = 'aitrainer_backoffice.controlling.notification' # a unique code
|
||||
|
||||
def do(self):
|
||||
pass
|
||||
#helper = MauticHelper()
|
||||
#helper.syncTrial()
|
||||
print(datetime.datetime.now(), " *** START notification ")
|
||||
self.notif.run()
|
||||
print(datetime.datetime.now(), " *** END notification ")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user