Add django-prodserver as a dependency#6186
Open
nanorepublica wants to merge 8 commits into
Open
Conversation
nanorepublica
force-pushed
the
feature/django-prodserver
branch
from
November 19, 2025 20:00
16b8d21 to
6103b4a
Compare
nanorepublica
marked this pull request as ready for review
November 19, 2025 20:20
Comment on lines
+4
to
+5
| worker: REMAP_SIGTERM=SIGQUIT python manage.py prodserver worker | ||
| beat: REMAP_SIGTERM=SIGQUIT python manage.py prodserver beat |
Member
There was a problem hiding this comment.
I tried to deploy that to heroku and I'm getting some errors (Sentry public link)
Logs
Worker process:
heroku/worker.1 Starting process with command `REMAP_SIGTERM=SIGQUIT python manage.py prodserver worker`
heroku/worker.1 State changed from starting to up
app/worker.1 Starting server named worker
app/worker.1 Traceback (most recent call last):
app/worker.1 File "/app/manage.py", line 30, in <module>
app/worker.1 main()
app/worker.1 ~~~~^^
app/worker.1 File "/app/manage.py", line 26, in main
app/worker.1 execute_from_command_line(sys.argv)
app/worker.1 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
app/worker.1 utility.execute()
app/worker.1 ~~~~~~~~~~~~~~~^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/django/core/management/__init__.py", line 436, in execute
app/worker.1 self.fetch_command(subcommand).run_from_argv(self.argv)
app/worker.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/management/commands/prodserver.py", line 64, in run_from_argv
app/worker.1 self.start_server(*args, **cmd_options)
app/worker.1 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/management/commands/prodserver.py", line 102, in start_server
app/worker.1 backend.start_server(*backend.prep_server_args())
app/worker.1 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/backends/celery.py", line 18, in start_server
app/worker.1 self.app.Worker(*args).start()
app/worker.1 ~~~~~~~~~~~~~~~^^^^^^^
app/worker.1 File "/app/.heroku/python/lib/python3.13/site-packages/celery/worker/worker.py", line 94, in __init__
app/worker.1 self.app.loader.init_worker()
app/worker.1 ^^^^^^^^^^^^^^^
app/worker.1 AttributeError: 'str' object has no attribute 'loader'. Did you mean: 'lower'?
app/worker.1 Sentry is attempting to send 2 pending events
app/worker.1 Waiting up to 2 seconds
app/worker.1 Press Ctrl-C to quit
heroku/worker.1 State changed from up to crashed
heroku/worker.1 Process exited with status 1
Beat process:
app/beat.1 Starting server named beat
app/beat.1 Traceback (most recent call last):
app/beat.1 File "/app/manage.py", line 30, in <module>
app/beat.1 main()
app/beat.1 ~~~~^^
app/beat.1 File "/app/manage.py", line 26, in main
app/beat.1 execute_from_command_line(sys.argv)
app/beat.1 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
app/beat.1 File "/app/.heroku/python/lib/python3.13/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
app/beat.1 utility.execute()
app/beat.1 ~~~~~~~~~~~~~~~^^
app/beat.1 File "/app/.heroku/python/lib/python3.13/site-packages/django/core/management/__init__.py", line 436, in execute
app/beat.1 self.fetch_command(subcommand).run_from_argv(self.argv)
app/beat.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
app/beat.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/management/commands/prodserver.py", line 64, in run_from_argv
app/beat.1 self.start_server(*args, **cmd_options)
app/beat.1 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
app/beat.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/management/commands/prodserver.py", line 102, in start_server
app/beat.1 backend.start_server(*backend.prep_server_args())
app/beat.1 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/beat.1 File "/app/.heroku/python/lib/python3.13/site-packages/django_prodserver/backends/celery.py", line 26, in start_server
app/beat.1 self.app.Beat(*args).start()
app/beat.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/beat.1 AttributeError: 'Beat' object has no attribute 'start'
app/beat.1 Sentry is attempting to send 2 pending events
app/beat.1 Waiting up to 2 seconds
app/beat.1 Press Ctrl-C to quit
heroku/beat.1 State changed from up to crashed
heroku/beat.1 Process exited with status 1
That might have been due to a change in Celery... ?
Author
There was a problem hiding this comment.
I have a project that was possibly erroring like this when trying to add celery with prodserver. Hopefully I'll have time over Christmas to look at this!
Author
There was a problem hiding this comment.
Small update from me. Christmas came and went without progress on this bug. After Athens I'm rethinking the command names and API, so I will get that locked down and developed before pushing this any further, I wouldn't want to merge something only for it to change in the next version I release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
django-prodserver is a package to centrally define the production processes to provide an interface to start them via a management command. This PR adds the necessary changes to settings and updates the scripts
Checklist:
Rationale