Skip to content

Commit

Permalink
Merge pull request #494 from open-contracting/refactor-packages
Browse files Browse the repository at this point in the history
refactor packages
  • Loading branch information
jpmckinney authored Oct 19, 2024
2 parents 5e9b718 + 0a5876e commit ad63f56
Show file tree
Hide file tree
Showing 96 changed files with 2,703 additions and 2,697 deletions.
2 changes: 1 addition & 1 deletion Dockerfile_django
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ ENV DJANGO_ENV=production
RUN python manage.py compilemessages

EXPOSE 8000
CMD ["daphne", "--bind", "0.0.0.0", "--port", "8000", "--proxy-headers", "spoonbill_web.asgi:application"]
CMD ["daphne", "--bind", "0.0.0.0", "--port", "8000", "--proxy-headers", "core.asgi:application"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ npx vue-cli-service serve
Start celery worker:

```shell
celery -A spoonbill_web worker -l INFO --concurrency=2
celery -A core worker -l INFO --concurrency=2
```

Start celery beat:

```shell
celery -A spoonbill_web beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
celery -A core beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
```

## Internationalization
Expand Down
4 changes: 4 additions & 0 deletions core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html
from core.celery import app as celery_app

__all__ = ("celery_app",)
5 changes: 0 additions & 5 deletions core/apps.py

This file was deleted.

8 changes: 4 additions & 4 deletions spoonbill_web/asgi.py → core/asgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
ASGI config for spoonbill_web project.
ASGI config for core project.
It exposes the ASGI callable as a module-level variable named ``application``.
Expand All @@ -13,14 +13,14 @@
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "spoonbill_web.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
django.setup()

import core.routing # noqa: E402
import spoonbill_web.routing # noqa: E402

application = ProtocolTypeRouter(
{
"http": get_asgi_application(),
"websocket": URLRouter(core.routing.websocket_urlpatterns),
"websocket": URLRouter(spoonbill_web.routing.websocket_urlpatterns),
}
)
4 changes: 2 additions & 2 deletions spoonbill_web/celery.py → core/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from celery import Celery

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "spoonbill_web.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")

app = Celery(
"spoonbill_web",
"core",
broker_connection_retry=False,
broker_connection_retry_on_startup=True,
broker_channel_error_retry=True,
Expand Down
Loading

0 comments on commit ad63f56

Please sign in to comment.