Add main method to ResaveAllEppResourcesPipeline (#1748)

Not sure how this got missed before, I am pretty sure we tested this on
alpha.
This commit is contained in:
gbrodman 2022-08-22 12:39:34 -04:00 committed by GitHub
parent 5268e35155
commit 5bccd65bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,7 @@ import java.io.Serializable;
import java.util.concurrent.ThreadLocalRandom;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.GroupIntoBatches;
import org.apache.beam.sdk.transforms.ParDo;
@ -172,4 +173,13 @@ public class ResaveAllEppResourcesPipeline implements Serializable {
resource.cloneProjectedAtTime(jpaTm().getTransactionTime()))));
}
}
public static void main(String[] args) {
PipelineOptionsFactory.register(ResaveAllEppResourcesPipelineOptions.class);
ResaveAllEppResourcesPipelineOptions options =
PipelineOptionsFactory.fromArgs(args)
.withValidation()
.as(ResaveAllEppResourcesPipelineOptions.class);
new ResaveAllEppResourcesPipeline(options).run();
}
}