-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: auto unlock locked tasks after 3 days #1984
base: development
Are you sure you want to change the base?
feat: auto unlock locked tasks after 3 days #1984
Conversation
4c3cd0a
to
0216242
Compare
Sorry for taking so long to review! Good thinking also accounting for the entities / building unlock, as well as tasks. Is there any chance we could look into:
The criteria for unlocking can be found in this comment: #1603 (comment) For the entities unlock, we could probably just base it on: if its 'open in ODK', but no activity in 1hr, then we reset the status. Does that sound reasonable? |
@spwoodcock |
Yeah I think its OK! This cron probably won't run really frequently, plus perhaps we can optimise in future somehow. But I imagine there will only be at most 10-20 active projects in the last week at any one time. Calling the ODK Central API for each is the only way unfortunately, due to the constraint of needing to support external ODK Collect instances |
Apologies I won't get time to review this for a while @Anuj-Gupta4 π It's a very nice chance, but it's low priority for now & I'm really running against the clock! If you could do some thorough testing in different scenarios, it will really help the review/merge in the new year β (also, we have never discussed this since you joined, but it's always been the case within the team that anyone can review anyone elses code! I shouldn't be a single point of failure) |
β¦reset entities after an hour
0216242
to
5850be5
Compare
No worries! |
What type of PR is this? (check all applicable)
Related Issue
Describe this PR
A new function has been created here that will unlock stale tasks.
There is also an endpoint that will help us test it manually.
Review Guide
Is there a better way to do this without disabling
task_event_state_trigger
?Is the logic implemented here correct?