Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofield #574

Merged
merged 3 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions django_q/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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
2 changes: 1 addition & 1 deletion django_q/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
6 changes: 3 additions & 3 deletions django_q/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.