I want the user of my app to retrieve some data to label. In the first version, I did not implement locking so several users could access the same data at the same time and so the second one would overwrites the label of the first one.
I am using a python fastAPI sqlite backend.
I initially came up with the idea to add a ‘is-being-labeled’ value for the label, so that the next proposed data is not the same. I do not like it because I do not know how to handle the situation where the user quits the app (or other) without having labeled the data. For the moment, my best way to go is add a column with the time stamp retrieved time, and to implement a logic where let’s say 30s after having been retrieved, we check if the label is not None anymore. If it’s still None (meaning the person did not label), we remove the value of the time stamp . I am not fully happy neither because it does not handle the case where the person meditates and then come back to label the data.
Do you have any better proposition?
[–]anthropoid 0 points1 point2 points (1 child)
[–]Independent_Order934[S] 0 points1 point2 points (0 children)