mirror of
https://github.com/google/nomulus
synced 2026-02-13 08:11:36 +00:00
Upload to GCS before uploading to FTP
Currently we encode and upload the deposite to GCS and the FTP server at the same time. This makes debugging harder as there are many possible points of failure, some of which are external and some internal. In this CL we start by encoding + uploading the deposit to GCS, and once that's done we copy the data from GCS to the FTP server. This will (hopefully) allow us to distinguish between errors on the FTP server and errors with the GCS connection. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199643208
This commit is contained in:
@@ -87,14 +87,15 @@ class EscrowTaskRunner {
|
||||
final Duration interval) {
|
||||
Callable<Void> lockRunner =
|
||||
() -> {
|
||||
logger.atInfo().log("TLD: %s", registry.getTld());
|
||||
DateTime startOfToday = clock.nowUtc().withTimeAtStartOfDay();
|
||||
Cursor cursor = ofy().load().key(Cursor.createKey(cursorType, registry)).now();
|
||||
logger.atInfo().log(
|
||||
"TLD: %s, cursorType: %s cursor: %s", registry.getTld(), cursorType, cursor);
|
||||
final DateTime nextRequiredRun = (cursor == null ? startOfToday : cursor.getCursorTime());
|
||||
if (nextRequiredRun.isAfter(startOfToday)) {
|
||||
throw new NoContentException("Already completed");
|
||||
}
|
||||
logger.atInfo().log("Cursor: %s", nextRequiredRun);
|
||||
logger.atInfo().log("CursorTime: %s", nextRequiredRun);
|
||||
task.runWithLock(nextRequiredRun);
|
||||
ofy()
|
||||
.transact(
|
||||
|
||||
Reference in New Issue
Block a user