add celery

This commit is contained in:
2024-04-22 16:31:59 +08:00
parent 3e1078d1ac
commit 31c454633a
8 changed files with 493 additions and 60 deletions

View File

@@ -1,4 +1,5 @@
from invoke import task
from threading import Thread
@task
@@ -6,6 +7,11 @@ def dev(c):
c.run("manage runserver", pty=True)
@task
def celery(c):
c.run("celery -A premier worker -l INFO -c 2 -P prefork -B", pty=True)
@task
def style(c):
c.run("ruff check . --fix && ruff format .", pty=True)