Addendum to:
2 Unexpected traffic from _beginParticipant.php.
We are running an asynchronous experiment
without groups.
We discovered that
clientConnected.php is being sent every 3 seconds, even in later stages of our experiment, due to that fact.
Would it be possible to introduce some kind of checkbox in the frontend, to increase the interval this checks are made? e.g. to every 60 seconds for tests without groups.
For now, we manually increased the timeout to 30 seconds in the
keepConnected.js file.
Code Patch available
We went ahead and created the
batchGetValues and
batchSetValues functions and would love to see them implemented on your side, to benefit all.
Since we cannot upload a .zip file here, these pastebins with code adjustments:
jsLibrary.js:
batchSetValues.php
https://pastebin.com/cCzmUWzhUsage example:
// get values from server and assign them to js variables
var {a1_counter, a2_counter, a3_counter, a4_counter, a5_counter, a6_counter}= batchGetValues([
'a1_counter',
'a2_counter',
'a3_counter',
]);
// set multiple values
batchSetValues({
'a1_counter': a1_counter+1,
'a2_counter': a2_counter+1,
'a3_counter': a3_counter+1,
})
Request for batchRecords function
Another thing we would love to get is a
batchRecords(['record1', 'record2']) function, which we cannot implement on our side, due to your processing of the column names into the
setup_tables.sql upon compilation.
Best regards,
Anton Schmidt