Closed tashrifbillah closed 9 months ago
Detecting when score is entered can be heard. Instead, can we come up with an idea of auto running this function every 30 seconds? https://github.com/AMP-SCZ/eeg-qc-dash/blob/c0a7a464f440f609c2ed0f54e4809d07bae2bdb5/app.py#L582
Hi @speroNCIRE , would 30 seconds be a good enough interval for auto saving the current context's scores?
I think so. Will the save button still be there in case you want to do it even faster?
Callback context when score changes or characters are input in the comment box:
{'prop_id': '{"sub_ses":"YA03473_20221128"}.value', 'value': -8}
[pid: 127162|app: 0|req: 124/124] 172.21.151.183 () {58 vars in 3440 bytes} [Fri Nov 17 11:53:01 2023] POST /eegqc-mock/_dash-update-component => generated 0 bytes in 7 msecs (HTTP/2.0 204) 1 headers in 67 bytes (0 switches on core 0)
{'prop_id': '{"sub_ses":"YA03473_20221128"}.value', 'value': -9}
[pid: 127162|app: 0|req: 125/125] 172.21.151.183 () {58 vars in 3440 bytes} [Fri Nov 17 11:53:17 2023] POST /eegqc-mock/_dash-update-component => generated 0 bytes in 8 msecs (HTTP/2.0 204) 1 headers in 67 bytes (0 switches on core 0)
{'prop_id': '{"sub_ses-1":"YA03473_20221128"}.value', 'value': 'h'}
[pid: 127162|app: 0|req: 126/126] 172.21.151.183 () {58 vars in 3440 bytes} [Fri Nov 17 11:53:33 2023] POST /eegqc-mock/_dash-update-component => generated 0 bytes in 4 msecs (HTTP/2.0 204) 1 headers in 67 bytes (0 switches on core 0)
{'prop_id': '{"sub_ses-1":"YA03473_20221128"}.value', 'value': 'hi'}
[pid: 127162|app: 0|req: 127/127] 172.21.151.183 () {58 vars in 3440 bytes} [Fri Nov 17 11:53:33 2023] POST /eegqc-mock/_dash-update-component => generated 0 bytes in 4 msecs (HTTP/2.0 204) 1 headers in 67 bytes (0 switches on core 0)
{'prop_id': '{"sub_ses-1":"YA03473_20221128"}.value', 'value': 'hia'}
[pid: 127162|app: 0|req: 128/128] 172.21.151.183 () {58 vars in 3440 bytes} [Fri Nov 17 11:53:34 2023] POST /eegqc-mock/_dash-update-component => generated 0 bytes in 5 msecs (HTTP/2.0 204) 1 headers in 67 bytes (0 switches on core 0)
{'prop_id': '{"sub_ses-1":"YA03473_20221128"}.value', 'value': 'hias'}
Score change trigger is infrequent but character input trigger is too frequent to save scores live. At the stroke of each key, callback is triggered!
What about making the key stroke callback only run an autosave if the current key is enter/return?
Questions: