Use cursor to track updating of registrar sheet

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138221931
This commit is contained in:
mcilwain 2016-11-04 12:36:23 -07:00 committed by Ben McIlwain
parent 3a75486c72
commit cef07f6bc5
9 changed files with 58 additions and 42 deletions

View file

@ -111,7 +111,6 @@ public class SyncRegistrarsSheetAction implements Runnable {
@Inject SyncRegistrarsSheet syncRegistrarsSheet;
@Inject @Config("sheetLockTimeout") Duration timeout;
@Inject @Config("sheetRegistrarId") Optional<String> idConfig;
@Inject @Config("sheetRegistrarInterval") Duration interval;
@Inject @Parameter("id") Optional<String> idParam;
@Inject SyncRegistrarsSheetAction() {}
@ -123,8 +122,7 @@ public class SyncRegistrarsSheetAction implements Runnable {
return;
}
if (!idParam.isPresent()) {
// TODO(b/19082368): Use a cursor.
if (!syncRegistrarsSheet.wasRegistrarsModifiedInLast(interval)) {
if (!syncRegistrarsSheet.wereRegistrarsModified()) {
Result.NOTMODIFIED.send(response, null);
return;
}