From d1f126064037046f7d5da2d415d6fab15a14efd4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Sep 2020 14:13:44 -0700 Subject: [PATCH] Renames fr_celery dir to celerywyrm --- Dockerfile | 4 ++-- {fr_celery => celerywyrm}/__init__.py | 0 {fr_celery => celerywyrm}/asgi.py | 4 ++-- {fr_celery => celerywyrm}/celery.py | 12 ++++++------ {fr_celery => celerywyrm}/settings.py | 18 +++++++++--------- {fr_celery => celerywyrm}/urls.py | 2 +- {fr_celery => celerywyrm}/wsgi.py | 4 ++-- docker-compose.yml | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) rename {fr_celery => celerywyrm}/__init__.py (100%) rename {fr_celery => celerywyrm}/asgi.py (73%) rename {fr_celery => celerywyrm}/celery.py (60%) rename {fr_celery => celerywyrm}/settings.py (90%) rename {fr_celery => celerywyrm}/urls.py (95%) rename {fr_celery => celerywyrm}/wsgi.py (73%) diff --git a/Dockerfile b/Dockerfile index 705427dbe..f03d84dd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,5 @@ RUN mkdir /app/images WORKDIR /app COPY requirements.txt /app/ RUN pip install -r requirements.txt -COPY ./fedireads /app -COPY ./fr_celery /app +COPY ./bookwyrm /app +COPY ./celerywyrm /app diff --git a/fr_celery/__init__.py b/celerywyrm/__init__.py similarity index 100% rename from fr_celery/__init__.py rename to celerywyrm/__init__.py diff --git a/fr_celery/asgi.py b/celerywyrm/asgi.py similarity index 73% rename from fr_celery/asgi.py rename to celerywyrm/asgi.py index f66a43b91..c03a6ec6b 100644 --- a/fr_celery/asgi.py +++ b/celerywyrm/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for fr_celery project. +ASGI config for celerywyrm project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fr_celery.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'celerywyrm.settings') application = get_asgi_application() diff --git a/fr_celery/celery.py b/celerywyrm/celery.py similarity index 60% rename from fr_celery/celery.py rename to celerywyrm/celery.py index f7ac2d33d..cae546a36 100644 --- a/fr_celery/celery.py +++ b/celerywyrm/celery.py @@ -6,9 +6,9 @@ import os from celery import Celery # set the default Django settings module for the 'celery' program. -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fr_celery.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'celerywyrm.settings') -app = Celery('fr_celery') +app = Celery('celerywyrm') # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. @@ -18,8 +18,8 @@ app.config_from_object('django.conf:settings', namespace='CELERY') # Load task modules from all registered Django app configs. app.autodiscover_tasks() -app.autodiscover_tasks(['fedireads'], related_name='incoming') -app.autodiscover_tasks(['fedireads'], related_name='broadcast') -app.autodiscover_tasks(['fedireads'], related_name='books_manager') -app.autodiscover_tasks(['fedireads'], related_name='goodreads_import') +app.autodiscover_tasks(['bookwyrm'], related_name='incoming') +app.autodiscover_tasks(['bookwyrm'], related_name='broadcast') +app.autodiscover_tasks(['bookwyrm'], related_name='books_manager') +app.autodiscover_tasks(['bookwyrm'], related_name='goodreads_import') diff --git a/fr_celery/settings.py b/celerywyrm/settings.py similarity index 90% rename from fr_celery/settings.py rename to celerywyrm/settings.py index 48aa1643b..f7fd77dd7 100644 --- a/fr_celery/settings.py +++ b/celerywyrm/settings.py @@ -1,5 +1,5 @@ """ -Django settings for fr_celery project. +Django settings for celerywyrm project. Generated by 'django-admin startproject' using Django 3.0.3. @@ -46,8 +46,8 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'fr_celery', - 'fedireads', + 'celerywyrm', + 'bookwyrm', 'celery', ] @@ -61,7 +61,7 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'fr_celery.urls' +ROOT_URLCONF = 'celerywyrm.urls' TEMPLATES = [ { @@ -79,7 +79,7 @@ TEMPLATES = [ }, ] -WSGI_APPLICATION = 'fr_celery.wsgi.application' +WSGI_APPLICATION = 'celerywyrm.wsgi.application' # Database @@ -90,15 +90,15 @@ FEDIREADS_DATABASE_BACKEND = env('FEDIREADS_DATABASE_BACKEND', 'postgres') FEDIREADS_DBS = { 'postgres': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': env('POSTGRES_DB', 'fedireads'), - 'USER': env('POSTGRES_USER', 'fedireads'), - 'PASSWORD': env('POSTGRES_PASSWORD', 'fedireads'), + 'NAME': env('POSTGRES_DB', 'bookwyrm'), + 'USER': env('POSTGRES_USER', 'bookwyrm'), + 'PASSWORD': env('POSTGRES_PASSWORD', 'bookwyrm'), 'HOST': env('POSTGRES_HOST', ''), 'PORT': 5432 }, 'sqlite': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'fedireads.db') + 'NAME': os.path.join(BASE_DIR, 'bookwyrm.db') } } diff --git a/fr_celery/urls.py b/celerywyrm/urls.py similarity index 95% rename from fr_celery/urls.py rename to celerywyrm/urls.py index c8cc543b4..1e506dee7 100644 --- a/fr_celery/urls.py +++ b/celerywyrm/urls.py @@ -1,4 +1,4 @@ -"""fr_celery URL Configuration +"""celerywyrm URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ diff --git a/fr_celery/wsgi.py b/celerywyrm/wsgi.py similarity index 73% rename from fr_celery/wsgi.py rename to celerywyrm/wsgi.py index 381265564..6de8d633f 100644 --- a/fr_celery/wsgi.py +++ b/celerywyrm/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for fr_celery project. +WSGI config for celerywyrm project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fr_celery.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'celerywyrm.settings') application = get_wsgi_application() diff --git a/docker-compose.yml b/docker-compose.yml index 1436b29fb..04770ef84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,7 +46,7 @@ services: build: . networks: - main - command: celery -A fr_celery worker -l info + command: celery -A celerywyrm worker -l info volumes: - .:/app depends_on: