Created
October 12, 2021 12:16
-
-
Save musketyr/ed9d31c09dba396cd488721dee022b80 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.agorapulse; | |
import io.micronaut.configuration.picocli.PicocliRunner; | |
import io.micronaut.context.env.Environment; | |
import jakarta.inject.Inject; | |
import picocli.CommandLine.Command; | |
import picocli.CommandLine.Option; | |
import java.time.Instant; | |
@Command(name = "micronaut-aws-batch-demo", description = "AWS Batch Demo", mixinStandardHelpOptions = true) | |
public class MicronautAwsBatchDemoCommand implements Runnable { | |
@Option(names = {"-t", "--timestamp"}, description = "the time when the event was triggered") | |
Instant timestamp; | |
@Inject Environment environment; | |
public static void main(String[] args) throws Exception { | |
PicocliRunner.run(MicronautAwsBatchDemoCommand.class, args); | |
} | |
public void run() { | |
System.out.printf("Event sent at %s to the environments %s", timestamp, environment.getActiveNames()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment