Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ var modifiedEvents = [];
var removedEvents = [];

function startSync(){
try{
if (PropertiesService.getUserProperties().getProperty('LastRun') > 0 && (new Date().getTime() - PropertiesService.getUserProperties().getProperty('LastRun')) < 360000) {
Logger.log("Another iteration is currently running! Exiting...");
return;
Expand Down Expand Up @@ -248,5 +249,11 @@ function startSync(){
sendSummary();
}
Logger.log("Sync finished!");
PropertiesService.getUserProperties().setProperty('LastRun', 0);
}
catch (e){
throw e;
}
Comment on lines +253 to +255

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not necessary and can be deleted. It's perfectly valid to have just a try ... finally.

finally{
PropertiesService.getUserProperties().setProperty('LastRun', 0);
}
}