@click.command(u'purge-jobs')
@click.option(u'--site', help=u'site name')
@click.option(u'--queue', default=None, help=u'one of "low", "default", "high')
@click.option(u'--event', default=None, help=u'one of "all", "weekly", "monthly", "hourly", "daily", "weekly_long", "daily_long"')
def purge_jobs(site=None, queue=None, event=None):
 from frappe.utils.doctor import purge_pending_jobs
 frappe.init((site or u''))
 count = purge_pending_jobs(event=event, site=site, queue=queue)
 print u'Purged {} jobs'.format(count)

@ click . command ( u'purge-jobs' ) @ click . option ( u'--site' , help = u'site name' ) @ click . option ( u'--queue' , default = None , help = u'one of "low", "default", "high' ) @ click . option ( u'--event' , default = None , help = u'one of "all", "weekly", "monthly", "hourly", "daily", "weekly_long", "daily_long"' ) def purge_jobs ( site = None , queue = None , event = None ) : from frappe . utils . doctor import purge_pending_jobs frappe . init ( ( site or u'' ) ) count = purge_pending_jobs ( event = event , site = site , queue = queue ) print u'Purged {} jobs' . format ( count )
purge any pending periodic tasks .