mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Add "toTime" parameter to RestoreCommitLogsAction web form
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155500640
This commit is contained in:
parent
ef1487cb57
commit
70e3271319
2 changed files with 10 additions and 1 deletions
|
@ -69,10 +69,12 @@ public class RestoreCommitLogsAction implements Runnable {
|
|||
static final String PATH = "/_dr/task/restoreCommitLogs";
|
||||
static final String DRY_RUN_PARAM = "dryRun";
|
||||
static final String FROM_TIME_PARAM = "fromTime";
|
||||
static final String TO_TIME_PARAM = "toTime";
|
||||
|
||||
@Inject GcsService gcsService;
|
||||
@Inject @Parameter(DRY_RUN_PARAM) boolean dryRun;
|
||||
@Inject @Parameter(FROM_TIME_PARAM) DateTime fromTime;
|
||||
@Inject @Parameter(TO_TIME_PARAM) DateTime toTime;
|
||||
@Inject DatastoreService datastoreService;
|
||||
@Inject GcsDiffFileLister diffLister;
|
||||
@Inject Retrier retrier;
|
||||
|
@ -87,7 +89,7 @@ public class RestoreCommitLogsAction implements Runnable {
|
|||
if (dryRun) {
|
||||
logger.info("Running in dryRun mode");
|
||||
}
|
||||
List<GcsFileMetadata> diffFiles = diffLister.listDiffFiles(fromTime, null);
|
||||
List<GcsFileMetadata> diffFiles = diffLister.listDiffFiles(fromTime, toTime);
|
||||
if (diffFiles.isEmpty()) {
|
||||
logger.info("Nothing to restore");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue