public String getCruiseStatus() { return this.toString(); }
public String getStatus() { return this.toString().toLowerCase(); }
public JobDTO(String name, String scheduleTime, String assignTime, String completeTime, JobState state, JobResult result, String agentUuid) { this.name = name; this.scheduleTime = scheduleTime; this.assignTime = assignTime; this.completeTime = completeTime; this.state = state.toString(); this.result = result.toString(); this.agentUuid = agentUuid; } }
public JobDTO(String name, Date scheduleTime, Date assignTime, Date completeTime, JobState state, JobResult result, String agentUuid) { this.name = name; this.scheduleTime = dateToString(scheduleTime); this.assignTime = dateToString(assignTime); this.completeTime = dateToString(completeTime); this.state = state.toString(); this.result = result.toString(); this.agentUuid = agentUuid; } }
public JobDTO(String name, Date scheduleTime, Date completeTime, JobState state, JobResult result, String agentUuid) { this.name = name; this.scheduleTime = dateToString(scheduleTime); this.completeTime = dateToString(completeTime); this.state = state.toString(); this.result = result.toString(); this.agentUuid = agentUuid; } }
public JobDTO(String name, String scheduleTime, String assignTime, String completeTime, JobState state, JobResult result, String agentUuid) { this.name = name; this.scheduleTime = scheduleTime; this.assignTime = assignTime; this.completeTime = completeTime; this.state = state.toString(); this.result = result.toString(); this.agentUuid = agentUuid; } }
public String getCurrentStatus() { return instance.currentStatus().toString(); }
public String displayStatusWithResult() { return state == JobState.Completed ? result.toString().toLowerCase() : state.toString().toLowerCase(); }
public void updateStatusFromAgent(JobIdentifier jobIdentifier, JobState jobState, String agentUuid) throws Exception { checkAgentUUID(jobIdentifier, agentUuid, jobState.toString()); LOGGER.debug("Changing status of job instance with identifier {} to {} from agent[{}]", jobIdentifier, jobState, agentUuid); scheduleService.updateJobStatus(jobIdentifier, jobState); }
public String getStatus() { JobState currentstatus = instance.currentStatus(); return (currentstatus == JobState.Scheduled || currentstatus == JobState.Waiting) ? getResult().toString() : currentstatus.toString().toLowerCase(); }
public static void toJSON(OutputWriter jsonWriter, JobStateTransition jobStateTransition) { jsonWriter.add("id", jobStateTransition.getId()); if (jobStateTransition.getCurrentState() != null) { jsonWriter.add("state", jobStateTransition.getCurrentState().toString()); } if (jobStateTransition.getStateChangeTime() != null) { jsonWriter.add("state_change_time", jobStateTransition.getStateChangeTime().getTime()); } } }
public void reportCurrentStatus(final AgentRuntimeInfo agentRuntimeInfo, final JobIdentifier jobIdentifier, final JobState state) { handleFailuresDuringReporting(agentRuntimeInfo, jobIdentifier, "status", state.toString(), () -> { //TODO: may be i don't belong here, ping already updates agent runtime info agentService.updateRuntimeInfo(agentRuntimeInfo); buildRepositoryService.updateStatusFromAgent(jobIdentifier, state, agentRuntimeInfo.getUUId()); jobStatusTopic.post(new JobStatusMessage(jobIdentifier, state, agentRuntimeInfo.getUUId())); }); }
private static Consumer<OutputListWriter> runningJobsToJSON(List<JobInstance> runningJobs) { return listWriter -> { runningJobs.stream().forEach(job -> { listWriter.addChild(childItemWriter -> { childItemWriter.add("pipeline_name", job.getPipelineName()); childItemWriter.add("pipeline_counter", job.getPipelineCounter()); childItemWriter.add("stage_name", job.getStageName()); childItemWriter.add("stage_counter", job.getStageCounter()); childItemWriter.add("name", job.getName()); childItemWriter.add("state", job.getState().toString()); childItemWriter.add("scheduled_date", new Timestamp(job.getScheduledDate().getTime())); childItemWriter.add("agent_uuid", job.getAgentUuid()); }); }); }; } }
public static void toJSON(OutputWriter jsonWriter, JobInstance jobInstance) { jsonWriter.add("id", jobInstance.getId()); jsonWriter.add("name", jobInstance.getName()); if (jobInstance.getState() != null) { jsonWriter.add("state", jobInstance.getState().toString()); } if (jobInstance.getResult() != null) { jsonWriter.add("result", jobInstance.getResult().toString()); } if (jobInstance.getScheduledDate() != null) { jsonWriter.add("scheduled_date", jobInstance.getScheduledDate().getTime()); } jsonWriter.add("rerun", jobInstance.isRerun()); if (jobInstance.getOriginalJobId() == null) { jsonWriter.add("original_job_id", (String) null); } else { jsonWriter.add("original_job_id", jobInstance.getOriginalJobId()); } jsonWriter.addWithDefaultIfBlank("agent_uuid", jobInstance.getAgentUuid(), (String) null); jsonWriter.add("pipeline_name", (String) null); jsonWriter.add("pipeline_counter", (String) null); jsonWriter.add("stage_name", (String) null); jsonWriter.add("stage_counter", (String) null); jsonWriter.addChildList("job_state_transitions", jobStateTransitionsWriter -> jobInstance.getTransitions().forEach( jobStateTransition -> jobStateTransitionsWriter.addChild( jobStateTransitionWriter -> JobStateTransitionRepresenter.toJSON(jobStateTransitionWriter, jobStateTransition)))); } }
root.addElement("state").addText(jobInstance.getState().toString());