Beispiel #1
0
def purge_jobs(site=None, queue=None, event=None):
    "Purge any pending periodic tasks, if event option is not given, it will purge everything for the site"
    from frappe.utils.doctor import purge_pending_jobs

    frappe.init(site or "")
    count = purge_pending_jobs(event=event, site=site, queue=queue)
    print "Purged {} jobs".format(count)
Beispiel #2
0
def purge_jobs(site=None, queue=None, event=None):
    "Purge any pending periodic tasks, if event option is not given, it will purge everything for the site"
    from frappe.utils.doctor import purge_pending_jobs

    frappe.init(site or "")
    count = purge_pending_jobs(event=event, site=site, queue=queue)
    print("Purged {} jobs".format(count))
Beispiel #3
0
 def setUp(self):
     purge_pending_jobs()
     if not frappe.get_all('Scheduled Job Type', limit=1):
         sync_jobs()