mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Send a plaintext link to the mapreduce console in fluent style
The link was previously being sent using a JS redirect, which doesn't work because the endpoints that trigger mapreduces can only be hit from the command line (because they require auth). This commit switches the link to be in plaintext and renders the full URL instead of just the path, so that clicking it directly from the terminal works. This also improves how these links are sent from callsites by using a fluent style. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228764606
This commit is contained in:
parent
072576ec9d
commit
765e63e7e9
31 changed files with 202 additions and 239 deletions
|
@ -37,7 +37,6 @@ import google.registry.request.Action;
|
|||
import google.registry.request.Parameter;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.request.auth.Auth;
|
||||
import google.registry.util.PipelineUtils;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -83,16 +82,14 @@ public class DeleteLoadTestDataAction implements Runnable {
|
|||
checkState(
|
||||
registryEnvironment != PRODUCTION, "This mapreduce is not safe to run on PRODUCTION.");
|
||||
|
||||
response.sendJavaScriptRedirect(
|
||||
PipelineUtils.createJobPath(
|
||||
mrRunner
|
||||
.setJobName("Delete load test data")
|
||||
.setModuleName("backend")
|
||||
.runMapOnly(
|
||||
new DeleteLoadTestDataMapper(isDryRun),
|
||||
ImmutableList.of(
|
||||
createEntityInput(ContactResource.class),
|
||||
createEntityInput(HostResource.class)))));
|
||||
mrRunner
|
||||
.setJobName("Delete load test data")
|
||||
.setModuleName("backend")
|
||||
.runMapOnly(
|
||||
new DeleteLoadTestDataMapper(isDryRun),
|
||||
ImmutableList.of(
|
||||
createEntityInput(ContactResource.class), createEntityInput(HostResource.class)))
|
||||
.sendLinkToMapreduceConsole(response);
|
||||
}
|
||||
|
||||
/** Provides the map method that runs for each existing contact and host entity. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue