fix: make python commands modular and reusable
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import os, frappe
|
||||
from frappe.utils.background_jobs import start_worker
|
||||
|
||||
queue = os.environ.get("WORKER_TYPE", "default")
|
||||
start_worker(queue, False)
|
||||
def main():
|
||||
queue = os.environ.get("WORKER_TYPE", "default")
|
||||
start_worker(queue, False)
|
||||
exit(0)
|
||||
|
||||
exit(0)
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user