-
Notifications
You must be signed in to change notification settings - Fork 35
Bundle activity logging #762
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
base: develop
Are you sure you want to change the base?
Conversation
Ngoakor12
left a comment
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.
Getting this when going to the unclaimed bundles page:
Traceback (most recent call last):
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/frontend/views.py", line 910, in project_review_coordination_unclaimed
ProjectReviewBundleClaim.deactivate_expired_claims()
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/project_review_coordination/models.py", line 131, in deactivate_expired_claims
expired_claim_ids = list(expired_claims.values_list("pk", flat=True))
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/query.py", line 287, in __iter__
self._fetch_all()
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/query.py", line 180, in __iter__
for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size):
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1108, in results_iter
results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size)
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1143, in execute_sql
sql, params = self.as_sql()
File "/home/ngoako/Desktop/code/umuzi/Tilde/backend/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 542, in as_sql
raise TransactionManagementError('select_for_update cannot be used outside of a transaction.')
django.db.transaction.TransactionManagementError: select_for_update cannot be used outside of a transaction.
[Tilde-backend] [2024-07-15 15:14:27] ERROR [django.server:157] "GET /project_review_coordination/unclaimed/ HTTP/1.1" 500 122526
Maybe it's todo with my existing claims. commenting out ProjectReviewBundleClaim.deactivate_expired_claims() in views helped
sheenarbw
left a comment
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.
The dramatiq actor seems to have been created because a different TODO note was misunderstood. Also, the actor is being called like a normal funciton so its not actually using dramatiq.
Rather just write simple code here
sheenarbw
left a comment
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.
small change needed. I think reading the logs will be confusing unless we make the names a bit more verbose
Related issues: [please specify]
Description:
Tracks when a bundle is claimed, unclaimed, when time is added, expired, completed.
Screenshots/videos
I solemnly swear that: