build: replace celery with procrastinate

This commit is contained in:
Herculino Trotta
2024-10-11 14:11:40 -03:00
parent c9ae8c9db5
commit 49db2089e8
18 changed files with 32 additions and 190 deletions

View File

@@ -1,8 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
rm -f './celerybeat.pid'
exec watchfiles --filter python celery.__main__.main --args '-A WYGIWYH.celery_app beat -l INFO'

View File

@@ -1,9 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
exec watchfiles --filter python celery.__main__.main \
--args \
"-A WYGIWYH.celery_app -b \"${CELERY_BROKER_URL}\" flower
--basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""

View File

@@ -1,7 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
exec watchfiles --filter python celery.__main__.main --args '-A WYGIWYH.celery_app worker -l INFO'

View File

@@ -39,17 +39,9 @@ COPY ./docker/dev/django/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
COPY ./docker/dev/celery/worker/start /start-celeryworker
RUN sed -i 's/\r$//g' /start-celeryworker
RUN chmod +x /start-celeryworker
COPY ./docker/dev/celery/beat/start /start-celerybeat
RUN sed -i 's/\r$//g' /start-celerybeat
RUN chmod +x /start-celerybeat
COPY ./docker/dev/celery/flower/start /start-flower
RUN sed -i 's/\r$//g' /start-flower
RUN chmod +x /start-flower
COPY ./docker/dev/procrastinate/start /start-procrastinate
RUN sed -i 's/\r$//g' /start-procrastinate
RUN chmod +x /start-procrastinate
# copy project
COPY ./app .

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -o errexit
set -o nounset
exec watchfiles --filter python "python manage.py procrastinate worker"

View File

@@ -1,8 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
rm -f './celerybeat.pid'
exec watchfiles --filter python celery.__main__.main --args '-A WYGIWYH.celery_app beat -l INFO'

View File

@@ -1,9 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
exec watchfiles --filter python celery.__main__.main \
--args \
"-A WYGIWYH.celery_app -b \"${CELERY_BROKER_URL}\" flower
--basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""

View File

@@ -1,7 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
exec watchfiles --filter python celery.__main__.main --args '-A WYGIWYH.celery_app worker -l INFO'

View File

@@ -51,17 +51,9 @@ COPY --chown=app:app ./docker/prod/django/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
COPY --chown=app:app ./docker/prod/celery/worker/start /start-celeryworker
RUN sed -i 's/\r$//g' /start-celeryworker
RUN chmod +x /start-celeryworker
COPY --chown=app:app ./docker/prod/celery/beat/start /start-celerybeat
RUN sed -i 's/\r$//g' /start-celerybeat
RUN chmod +x /start-celerybeat
COPY --chown=app:app ./docker/prod/celery/flower/start /start-flower
RUN sed -i 's/\r$//g' /start-flower
RUN chmod +x /start-flower
COPY --chown=app:app ./docker/prod/procrastinate/start /start-procrastinate
RUN sed -i 's/\r$//g' /start-procrastinate
RUN chmod +x /start-procrastinate
# copy project
COPY ./app .

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -o errexit
set -o nounset
exec python manage.py procrastinate worker