def start_worker(queue): from frappe.utils.background_jobs import start_worker start_worker(queue)
def start_worker(queue, quiet = False): from frappe.utils.background_jobs import start_worker start_worker(queue, quiet = quiet)
def start_background_worker(queue, quiet): patch_all() from frappe.utils.background_jobs import start_worker print('Starting latte patched worker at', queue) start_worker(queue, quiet)
def main(): queue = os.environ.get("WORKER_TYPE", "default") start_worker(queue, False) exit(0)
def start_worker(queue, quiet = False, rq_username=None, rq_password=None): """Site is used to find redis credentals. """ from frappe.utils.background_jobs import start_worker start_worker(queue, quiet = quiet, rq_username=rq_username, rq_password=rq_password)
import os, frappe from frappe.utils.background_jobs import start_worker queue = os.environ.get("WORKER_TYPE", "default") start_worker(queue, False) exit(0)