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
However, if a proofreader starts a task and steps away, there is no way for us in the backend to store the information of what time was actually spent proofreading versus paused, afk, etc.
Theres a couple of ways to get around this, for now one idea is to have a duration attribute added Task schema that is a strictly positive counter of how many seconds a proofreader has spent on a task.
This is how it would work:
Task is created. duration is set to 0 by default.
Task is opened. open time is recorded (this is already built). In the frontend django app, we use a cookie to keep track of the user session. Here we have multiple cases:
Case 1: task is completed in one sitting:
the frontend sends a PATCH request to the completed task ID that adds the current duration with the session cookie time delta. duration = duration + session.time. The task is marked as closed. No additions to duration can happen after a task is closed.
Case 2. task is not complete (user pauses or exits)
the frontend sends a PATCH request to the unfinished task ID that adds the current duration with the session cookie time delta. duration = duration + session.time. Since the task is open still, more additions to duration can happen.
Capability to build out:
add duration attribute, Number type, default to 0.
add a patch function for duration in the url tasks/{task_id}/duration/ that adds the request response to the current duration and updates it in the MongoDB doc
No description provided.
The text was updated successfully, but these errors were encountered: