-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Move worker script #97
Merged
Merged
Conversation
This file contains 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
igorbenav
requested changes
Jan 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to run before PR, I'm getting:
fastapi-boilerplate-worker-1 | Traceback (most recent call last):
fastapi-boilerplate-worker-1 | File "/usr/local/bin/arq", line 8, in <module>
fastapi-boilerplate-worker-1 | sys.exit(cli())
fastapi-boilerplate-worker-1 | ^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
fastapi-boilerplate-worker-1 | return self.main(*args, **kwargs)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
fastapi-boilerplate-worker-1 | rv = self.invoke(ctx)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
fastapi-boilerplate-worker-1 | return ctx.invoke(self.callback, **ctx.params)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
fastapi-boilerplate-worker-1 | return __callback(*args, **kwargs)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/arq/cli.py", line 40, in cli
fastapi-boilerplate-worker-1 | worker_settings_ = cast('WorkerSettingsType', import_string(worker_settings))
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/site-packages/arq/utils.py", line 146, in import_string
fastapi-boilerplate-worker-1 | module = import_module(module_path)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
fastapi-boilerplate-worker-1 | return _bootstrap._gcd_import(name[level:], package, level)
fastapi-boilerplate-worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fastapi-boilerplate-worker-1 | File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
fastapi-boilerplate-worker-1 | File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
fastapi-boilerplate-worker-1 | File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
fastapi-boilerplate-worker-1 | ModuleNotFoundError: No module named 'app.worker'
You need to update the reference in docker-compose.yml
as well.
I have updated the reference in |
igorbenav
approved these changes
Jan 10, 2024
@AlessioBugetti nice one, thanks! |
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.
worker
folder insidecore
and moved the worker logic to this new folder (app/worker.py
->app/core/worker/settings.py
,app/core/worker/functions.py
)README.md
Fix #94