langcog / web-cdi

7 stars 5 forks source link

ws vocabularies > 680 #359

Closed mcfrank closed 1 year ago

mcfrank commented 2 years ago

seems like when we download data from WS English (American) we get some kids with Total_Produced > 680. maybe @vmarchman can give a reprex or example of subjects that have this issue?

HenryMehta commented 1 year ago

@vmarchman @mcfrank The way this program works is when the calculation starts, values are set to 0 and then amended incrementally as records are checked. The problem is sometimes, and I think this is people double clicking the finish button, the calculations are performed twice and the second overlaps the first. So the first sets values to zero, starts amending them, then the second sets values to zero, first and second continue to amend, first finishes and second finishes.

I've tried fixing this many times and many ways without success so I propose a different approach. Instead of doing the calculation during form filling or at the end, we move it to an action for the researcher. We'll give then a checkbox to highlight those they want to process and we'll do the processing in the background and send them a message once complete.

This still runs the risk of a researcher running the process twice at the same time, so I'll think about how to sort that at the same time if you're happy with the approach

vmarchman commented 1 year ago

@Henry @.***> How does this solution affect the graph at the end?

On Mon, Aug 8, 2022 at 2:29 AM Henry Mehta @.***> wrote:

@vmarchman https://github.com/vmarchman @mcfrank https://github.com/mcfrank The way this program works is when the calculation starts, values are set to 0 and then amended incrementally as records are checked. The problem is sometimes, and I think this is people double clicking the finish button, the calculations are performed twice and the second overlaps the first. So the first sets values to zero, starts amending them, then the second sets values to zero, first and second continue to amend, first finishes and second finishes.

I've tried fixing this many times and many ways without success so I propose a different approach. Instead of doing the calculation during form filling or at the end, we move it to an action for the researcher. We'll give then a checkbox to highlight those they want to process and we'll do the processing in the background and send them a message once complete.

This still runs the risk of a researcher running the process twice at the same time, so I'll think about how to sort that at the same time if you're happy with the approach

— Reply to this email directly, view it on GitHub https://github.com/langcog/web-cdi/issues/359#issuecomment-1207885223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2TUTB67A25RKY2IU4FOITVYDHN3ANCNFSM5DXPVWZA . You are receiving this because you were mentioned.Message ID: @.***>

HenryMehta commented 1 year ago

@vmarchman blast, I had forgotten about that. Will think again

HenryMehta commented 1 year ago

@vmarchman @mcfrank I have been trying to replicate the issue locally, without success.

I've one more idea which I got while typing the above sentence which I will try once I've sent this. In the meantime, I'm running an update to correct all the existing values and ensure they're ok