You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, In order to actually get only the tasks that are ongoing, I added another filter (another workaround) to handle this:
def get_random_task(project_id, user_id=None, user_ip=None,n_answers=30, offset=0):
"""Return a random task for the user."""
project = project_repo.get(project_id)
if project and len(project.tasks) > 0:
ongoing_tasks = [task for task in project.tasks if task.state=='ongoing']
return [random.choice(ongoing_tasks)]
else:
return []
After installing this plugin, I'm not able to perform the following operation:
Root Cause Analysis:
As I have checked, the error is thrown at:
api/init.py:188
Throwing below error message:
Prototype of new_task in sched.py:
In the plugin, the new_task function has been reassigned:
But with_random_scheduler's wrapper only takes 5 arguments:
Basically, I made the below changes to make it work, I'm sure it's just a workaround:
The text was updated successfully, but these errors were encountered: