mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
Run automatic Java 8 conversion over codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171174380
This commit is contained in:
parent
44df5da771
commit
5edb7935ed
190 changed files with 2312 additions and 3096 deletions
|
@ -134,19 +134,16 @@ public class SyncRegistrarsSheetAction implements Runnable {
|
|||
}
|
||||
|
||||
String sheetLockName = String.format("%s: %s", LOCK_NAME, sheetId.get());
|
||||
Callable<Void> runner = new Callable<Void>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Void call() throws IOException {
|
||||
try {
|
||||
syncRegistrarsSheet.run(sheetId.get());
|
||||
Result.OK.send(response, null);
|
||||
} catch (IOException e) {
|
||||
Result.FAILED.send(response, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
Callable<Void> runner =
|
||||
() -> {
|
||||
try {
|
||||
syncRegistrarsSheet.run(sheetId.get());
|
||||
Result.OK.send(response, null);
|
||||
} catch (IOException e) {
|
||||
Result.FAILED.send(response, e);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
if (!lockHandler.executeWithLocks(runner, null, timeout, sheetLockName)) {
|
||||
// If we fail to acquire the lock, it probably means lots of updates are happening at once, in
|
||||
// which case it should be safe to not bother. The task queue definition should *not* specify
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue