Skip to content

Commit

Permalink
Fix lock waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Atuchin committed Nov 30, 2018
1 parent d589fb1 commit 044de2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server_Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ function handleClientForm(FormResponse){
// we will choose size really bigger than actual and then wait for lock
// because of very slow getlastrow
var modelSize = modelSheet.getLastRow() - MODEL_START + CONST_MORE_THAN_JUDGIES;
lock.waitLock(LOCK_TIMEOUT_MS);
try {
lock.waitLock(LOCK_TIMEOUT_MS);
} catch(err){
FormResponse.serverResponse = "Превышено время ожидания";
return JSON.stringify(FormResponse);
}

//tokens stuff
var modelData = modelSheet.getRange(MODEL_START, 1, modelSize, 2).getValues();
Expand Down

0 comments on commit 044de2d

Please sign in to comment.