-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix(sse_recurring_task): reload sse/tasks #3108
Conversation
We need to reload sse/tasks after setting RUN_BY_PROCESSOR because it's imported before (it is loaded as part of loading installed app) that environment var is set Call Stack: ``` [0] /home/gagan/Flag/flagsmith/api/manage.py(10)<module>() -> execute_from_command_line(sys.argv) [1] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/core/management/__init__.py(419)execute_from_command_line() -> utility.execute() [2] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/core/management/__init__.py(395)execute() -> django.setup() [3] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/__init__.py(24)setup() -> apps.populate(settings.INSTALLED_APPS) [4] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/apps/registry.py(122)populate() -> app_config.ready() [5] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/contrib/admin/apps.py(27)ready() -> self.module.autodiscover() [6] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/contrib/admin/__init__.py(24)autodiscover() -> autodiscover_modules('admin', register_to=site) [7] /home/gagan/Flag/flagsmith/api/_venv/lib/python3.10/site-packages/django/utils/module_loading.py(47)autodiscover_modules() [15] /home/gagan/Flag/flagsmith/api/environments/admin.py(7)<module>() -> from .tasks import rebuild_environment_document -> from sse import ( -> from .sse_service import ( # noqa -> from sse import tasks -> @register_task_handler() ```
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3108 +/- ##
==========================================
- Coverage 95.92% 95.91% -0.01%
==========================================
Files 1037 1037
Lines 30882 30900 +18
==========================================
+ Hits 29623 29638 +15
- Misses 1259 1262 +3 ☔ View full report in Codecov by Sentry. |
85cf09b
to
924bca5
Compare
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
We need to reload sse/tasks after setting RUN_BY_PROCESSOR because it's imported before (it is loaded as part of loading installed app) that environment var is set
Call Stack:
How did you test this code?
Adds unit test case
Tested manually by running the task processor manually to verify the task was installed, correctly