All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.enioka.jqm.cli.CommandGetJiStatus Maven / Gradle / Ivy

The newest version!
package com.enioka.jqm.cli;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.enioka.jqm.cli.api.CommandBase;
import com.enioka.jqm.client.api.JqmDbClientFactory;

@Parameters(commandNames = "Get-JiStatus", commandDescription = "Fetch the status of a running or ended job instance.")
class CommandGetJiStatus extends CommandBase
{
    @Parameter(names = { "-i", "--id" }, description = "ID of the job instance to query.", required = true)
    private Long id;

    @Override
    public int doWork()
    {
        jqmlogger.info("Status is: " + JqmDbClientFactory.getClient().getJob(id).getState());
        return 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy