mirror of
https://github.com/google/nomulus.git
synced 2025-05-19 18:59:35 +02:00
Always attempt to save the claims list to Cloud SQL (#472)
* Always attempt to save the claims list to Cloud SQL
This commit is contained in:
parent
a5d08ae057
commit
44ac2d14cf
1 changed files with 1 additions and 8 deletions
|
@ -37,11 +37,6 @@ final class UploadClaimsListCommand extends ConfirmingCommand implements Command
|
|||
@Parameter(description = "Claims list filename")
|
||||
private List<String> mainParameters = new ArrayList<>();
|
||||
|
||||
@Parameter(
|
||||
names = {"--also_cloud_sql"},
|
||||
description = "Persist claims list to Cloud SQL in addition to Datastore; defaults to false.")
|
||||
boolean alsoCloudSql;
|
||||
|
||||
private String claimsListFilename;
|
||||
|
||||
private ClaimsList claimsList;
|
||||
|
@ -64,9 +59,7 @@ final class UploadClaimsListCommand extends ConfirmingCommand implements Command
|
|||
@Override
|
||||
public String execute() {
|
||||
ClaimsListShard.create(claimsList.getTmdbGenerationTime(), claimsList.getLabelsToKeys()).save();
|
||||
if (alsoCloudSql) {
|
||||
ClaimsListDao.trySave(claimsList);
|
||||
}
|
||||
return String.format("Successfully uploaded claims list %s", claimsListFilename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue