Skip to content
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

Issue starting Celery in generated APP #50

Closed
scattered-development opened this issue Jul 17, 2024 · 3 comments
Closed

Issue starting Celery in generated APP #50

scattered-development opened this issue Jul 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@scattered-development
Copy link
Contributor

scattered-development commented Jul 17, 2024

Hi

There seems to be an Issue starting Celery in generated APP . I have been unable to resolve. Seems to be related to change in URL handling between pydantic 1 and 2 (pydantic/pydantic#6395) , where in v1 the base class is string. The logs are below.

2024-07-17 18:47:08 Checking dependencies
2024-07-17 18:47:09 Syncing dependencies
2024-07-17 18:48:52 INFO:__main__:Initializing service
2024-07-17 18:48:52 INFO:__main__:Starting call to '__main__.init', this is the 1st time calling it.
2024-07-17 18:48:54 INFO:__main__:Service finished initializing
2024-07-17 18:48:55 Checking dependencies
2024-07-17 18:49:15 Usage: celery [OPTIONS] COMMAND [ARGS]...
2024-07-17 18:49:15 Try 'celery --help' for help.
2024-07-17 18:49:15 
2024-07-17 18:49:15 Error: Invalid value for '-A' / '--app': 
2024-07-17 18:49:15 Unable to load celery application.
2024-07-17 18:49:15 'pydantic_core._pydantic_core.url' object has no attribute 'strip'

as mentioned in readme docs testing might not be working - there is 0% coverage of the celery worker & testing of backend is failing in user token. Full stack is not running as celery worker has exited

================================================================= short test summary info ==================================================================
ERROR app/tests/api/api_v1/test_login.py::test_use_access_token - ValueError: Token mismatch between key and user.
ERROR app/tests/api/api_v1/test_users.py::test_get_users_normal_user_me
========================================================= 14 passed, 4 warnings, 2 errors in 5.99s =========================================================

@scattered-development
Copy link
Contributor Author

Looking deeper and adding further logs it seems to be caused by Sentry. I see that Raven is in use, which is now deprecated in favour of sentry_sdk. I have made this update and celery worker is now up and running.

I can create a PR for this and make the change, if wanted?

@Jibola
Copy link
Collaborator

Jibola commented Jul 19, 2024

@scattered-development hey, thank you for finding this and absolutely make a PR.

@blink1073 blink1073 added the bug Something isn't working label Jul 26, 2024
@Jibola
Copy link
Collaborator

Jibola commented Sep 6, 2024

PR Merged!

@Jibola Jibola closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants