mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 18:28:11 +08:00
@@ -6,6 +6,7 @@ from django_q.conf import Conf
|
||||
class DjangoQConfig(AppConfig):
|
||||
name = "django_q"
|
||||
verbose_name = Conf.LABEL
|
||||
default_auto_field = "django.db.models.AutoField"
|
||||
|
||||
def ready(self):
|
||||
from django_q.signals import call_hook
|
||||
|
||||
+1
-1
@@ -745,7 +745,7 @@ def rss_check():
|
||||
|
||||
|
||||
def localtime() -> datetime:
|
||||
"""" Override for timezone.localtime to deal with naive times and local times"""
|
||||
""" Override for timezone.localtime to deal with naive times and local times"""
|
||||
if settings.USE_TZ:
|
||||
return timezone.localtime()
|
||||
return datetime.now()
|
||||
|
||||
@@ -283,7 +283,7 @@ def test_scheduler(broker, monkeypatch):
|
||||
)
|
||||
@pytest.mark.django_db
|
||||
def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_are_used(
|
||||
orm_no_replica_broker: Broker,
|
||||
orm_no_replica_broker: Broker,
|
||||
):
|
||||
"""
|
||||
GIVEN a environment without a read replica database
|
||||
@@ -302,7 +302,7 @@ def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_a
|
||||
)
|
||||
@pytest.mark.django_db
|
||||
def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_replicas_are_used(
|
||||
orm_replica_broker: Broker,
|
||||
orm_replica_broker: Broker,
|
||||
):
|
||||
"""
|
||||
GIVEN a environment with a read/write configured replica database
|
||||
@@ -320,7 +320,7 @@ def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_r
|
||||
)
|
||||
@pytest.mark.django_db
|
||||
def test_scheduler_atomic_transaction_must_specify_the_database_based_on_router_redirection(
|
||||
orm_no_replica_broker: Broker,
|
||||
orm_no_replica_broker: Broker,
|
||||
):
|
||||
"""
|
||||
GIVEN a environment without a read replica database
|
||||
|
||||
Reference in New Issue
Block a user