mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-05 02:58:12 +08:00
Build improvements (#569)
* Black linting * Adding Black to dev dependencies and upping minimal python to 3.6.2 for compatibility * Updating packages * Removing pip-tools input and exporting requirements with poetry * Deleting old setup files and test runner * Trying 1.3.7 * Looser extras requirements to prevent conflicts * Sorted imports with isort * Added iSort to dev dependencies * Fixes localtime for naive setups
This commit is contained in:
@@ -10,15 +10,15 @@ class Command(BaseCommand):
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument(
|
||||
'--run-once',
|
||||
action='store_true',
|
||||
dest='run_once',
|
||||
"--run-once",
|
||||
action="store_true",
|
||||
dest="run_once",
|
||||
default=False,
|
||||
help='Run once and then stop.',
|
||||
help="Run once and then stop.",
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
q = Cluster()
|
||||
q.start()
|
||||
if options.get('run_once', False):
|
||||
if options.get("run_once", False):
|
||||
q.stop()
|
||||
|
||||
@@ -3,7 +3,7 @@ from django.utils.translation import gettext as _
|
||||
|
||||
from django_q import VERSION
|
||||
from django_q.conf import Conf
|
||||
from django_q.monitor import info, get_ids
|
||||
from django_q.monitor import get_ids, info
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
@@ -27,5 +27,5 @@ class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
memory(
|
||||
run_once=options.get("run_once", False),
|
||||
workers=options.get("workers", False)
|
||||
workers=options.get("workers", False),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user