code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
private void updateServerHealthStateToError(JobInstance jobInstance, String message, String description) {
HealthStateScope scope = forJob(jobInstance.getPipelineName(), jobInstance.getStageName(), jobInstance.getName());
final ServerHealthState error = error(message, description, general(scope));
... | Understands loads scheduled pipeline for creating work | updateServerHealthStateToError | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | Apache-2.0 |
private MaterialConfig materialFrom(MaterialConfigs knownMaterials, MaterialRevision materialRevision) {
for (MaterialConfig knownMaterial : knownMaterials) {
if (knownMaterial.getFingerprint().equals(materialRevision.getMaterial().getFingerprint())) {
return knownMaterial;
... | Understands loads scheduled pipeline for creating work | materialFrom | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | Apache-2.0 |
private MaterialConfigs knownMaterials(Pipeline pipeline, MaterialRevisions scheduledRevs) {
CruiseConfig currentConfig = goConfigService.getCurrentConfig();
MaterialConfigs configuredMaterials = new MaterialConfigs();
for (MaterialRevision revision : scheduledRevs) {
String fingerpr... | Understands loads scheduled pipeline for creating work | knownMaterials | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | Apache-2.0 |
private void appendToConsoleLog(JobInstance jobInstance, String message) {
try {
consoleService.appendToConsoleLog(jobInstance.getIdentifier(), "\n" + message + "\n");
} catch (Exception e) {
throw new RuntimeException(e);
}
} | Understands loads scheduled pipeline for creating work | appendToConsoleLog | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduledPipelineLoader.java | Apache-2.0 |
public Stage rerunStage(String pipelineName, Integer pipelineCounter, String stageName, HttpOperationResult result) {
String identifier = StringUtils.join(List.of(pipelineName, pipelineCounter, stageName), "/");
HealthStateType healthStateType = HealthStateType.general(HealthStateScope.forStage(pipeline... | Top-level operation only; consumes exceptions | rerunStage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private Stage lockAndRerunStage(String pipelineName, Integer counter, String stageName, StageInstanceCreator creator, final ErrorConditionHandler errorHandler) {
synchronized (mutexForPipeline(pipelineName)) {
OperationResult result = new ServerHealthStateOperationResult();
if (!scheduli... | Top-level operation only; consumes exceptions | lockAndRerunStage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public Stage rerunJobs(final Stage stage, final List<String> jobNames, final HttpOperationResult result) {
final StageIdentifier identifier = stage.getIdentifier();
HealthStateType healthStateForStage = HealthStateType.general(HealthStateScope.forStage(identifier.getPipelineName(), identifier.getStageNa... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | rerunJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public Stage rerunFailedJobs(final Stage stage, final HttpOperationResult result) {
final StageIdentifier identifier = stage.getIdentifier();
JobInstances jobInstances = stage.jobsWithResult(JobResult.Cancelled, JobResult.Failed);
List<String> jobNames = jobInstances.stream().map(JobInstance::ge... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | rerunFailedJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private String mutexForPipeline(String pipelineName) {
String s = String.format("%s_forPipeline_%s", getClass().getName(), pipelineName);
return s.intern(); // interned because we synchronize on it
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | mutexForPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private void triggerNextStageInPipeline(Pipeline pipeline, String stageName, String approvedBy) {
StageConfig nextStage = stageOrderService.getNextStage(pipeline, stageName);
if (nextStage == null) {
return;
}
if (!nextStage.supportAutoApproval()) {
return;
... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | triggerNextStageInPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private boolean isStageActive(Pipeline pipeline, StageConfig nextStage) {
return stageDao.isStageActive(pipeline.getName(), CaseInsensitiveString.str(nextStage.name()));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | isStageActive | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void automaticallyTriggerRelevantStagesFollowingCompletionOf(Stage stage) {
if (!stage.isCompleted()) {
return;
}
try {
Pipeline pipeline = pipelineDao.loadPipeline(stage.getPipelineId());
unlockIfNecessary(pipeline, stage);
if (pipelinePa... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | automaticallyTriggerRelevantStagesFollowingCompletionOf | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void unlockIfNecessary(Pipeline pipeline, Stage stage) {
StageConfig nextStage = stageOrderService.getNextStage(pipeline, stage.getName());
boolean isLastStage = nextStage == null;
boolean isUnlockable = goConfigService.isUnlockableWhenFinished(pipeline.getName());
boolean nextS... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | unlockIfNecessary | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private boolean shouldTriggerThisStageInNewerPipeline(Pipeline pipeline, Stage stage) {
return !goConfigService.isFirstStage(pipeline.getName(), stage.getName())
&& !goConfigService.requiresApproval(new CaseInsensitiveString(pipeline.getName()), new CaseInsensitiveString(stage.getName()));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | shouldTriggerThisStageInNewerPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private void triggerCurrentStageInNewerPipeline(String pipelineName, Stage currentStage) {
// get the most recent passed stage in this collection of pipeline id's
StageConfig previousStage = goConfigService.previousStage(pipelineName, currentStage.getName());
Stage mostRecentPassed = stageServic... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | triggerCurrentStageInNewerPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public Stage cancelAndTriggerRelevantStages(Long stageId, Username username, LocalizedOperationResult result) throws Exception {
Stage stageForId;
LocalizedOperationResult opResult = result == null ? new DefaultLocalizedOperationResult() : result;
try {
stageForId = stageService.stag... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cancelAndTriggerRelevantStages | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
stageService.cancelStage(stage, user);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
automaticallyTriggerRelevantStagesFollowingCompletionOf(stage);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public boolean canRun(PipelineIdentifier pipelineIdentifier, String stageName, String username, boolean hasPreviousStageBeenScheduled) {
ServerHealthStateOperationResult result = new ServerHealthStateOperationResult();
return canRun(pipelineIdentifier, stageName, username, hasPreviousStageBeenScheduled,... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | canRun | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public boolean canRun(PipelineIdentifier pipelineIdentifier, String stageName, String username, boolean hasPreviousStageBeenScheduled, ServerHealthStateOperationResult result) {
if (!goConfigService.hasStageConfigNamed(pipelineIdentifier.getName(), stageName)) {
return false;
}
sche... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | canRun | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void updateJobStatus(final JobIdentifier jobIdentifier, final JobState jobState) throws Exception {
// have to synchronize at stage-level because cancellation happens at stage-level
final String stageMutex = mutexForStageInstance(jobIdentifier);
synchronized (stageMutex) {
syn... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | updateJobStatus | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
if (job.isNull() || job.getState() == JobState.Rescheduled || job.getResult() == JobResult.Cancelled) {
return;
}
job.ch... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void afterCommit() {
stageDao.clearCachedAllStages(jobIdentifier.getPipelineName(), jobIdentifier.getPipelineCounter(), jobIdentifier.getStageName());
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | afterCommit | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
if (job.isCompleted()) {
Stage stage = stageService.stageById(job.getStageId());
automaticallyTriggerRelevantStagesFollowingCompletionOf(stag... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private String mutexForStageInstance(StageIdentifier id) {
return mutexForStageInstance(id.getPipelineName(), id.getPipelineCounter(), id.getStageName(), id.getStageCounter());
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | mutexForStageInstance | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private String mutexForStageInstance(JobIdentifier id) {
return mutexForStageInstance(id.getPipelineName(), id.getPipelineCounter(), id.getStageName(), id.getStageCounter());
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | mutexForStageInstance | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private String mutexForStageInstance(String pipelineName, Integer pipelineCounter, String stageName, String stageCounter) {
String s = String.format("%s_forStageInstance_%s_%s_%s_%s", getClass().getName(), pipelineName, pipelineCounter, stageName, stageCounter);
return s.intern(); // interned because we... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | mutexForStageInstance | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void rescheduleHungJobs() {
try {
//TODO 2779
AgentInstances knownAgents = agentService.findRegisteredAgents();
List<String> liveAgentIdList = getLiveAgentUuids(knownAgents);
if (!liveAgentIdList.isEmpty()) {
JobInstances jobs = jobInstanceS... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | rescheduleHungJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void cancelHungJobs() {
try {
consoleActivityMonitor.cancelUnresponsiveJobs(this);
} catch (Exception e) {
LOGGER.error("Error occurred during cancelling unresponsive job: ", e);
}
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cancelHungJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private List<String> getLiveAgentUuids(AgentInstances knownAgents) {
List<String> agents = new ArrayList<>();
for (AgentInstance agent : knownAgents) {
if (agent.getStatus() != AgentStatus.LostContact) {
agents.add(agent.getAgent().getUuid());
}
}
... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | getLiveAgentUuids | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void rescheduleAbandonedBuildIfNecessary(final AgentIdentifier identifier) {
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
final JobInstance jobInstance = agent... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | rescheduleAbandonedBuildIfNecessary | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
final JobInstance jobInstance = agentAssignment.latestActiveJobOnAgent(identifier.getUuid());
if (jobInstance != null) {
LOGGER.warn("[Job Reschedule] Found latest incomplete... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void rescheduleJob(final JobInstance toBeRescheduled) {
final JobIdentifier jobIdentifier = toBeRescheduled.getIdentifier();
synchronized (mutexForStageInstance(jobIdentifier)) {
synchronized (mutexForJob(jobIdentifier)) {
transactionTemplate.execute(new TransactionCal... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | rescheduleJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
LOGGER.warn("[Job Reschedule] Rescheduling and marking old job as ignored: {}", toBeRescheduled);
//Reloading it because we want to see the latest committed state after a... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void cancelJob(final JobInstance instance) {
synchronized (mutexForStageInstance(instance.getIdentifier())) {
stageService.cancelJob(instance);
}
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cancelJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void jobCompleting(JobIdentifier jobIdentifier, JobResult result, String agentUuid) {
// have to synchronize at stage-level because cancellation happens at stage-level
synchronized (mutexForStageInstance(jobIdentifier)) {
synchronized (mutexForJob(jobIdentifier)) {
Job... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | jobCompleting | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public boolean updateAssignedInfo(String agentUuid, JobPlan job) {
// have to synchronize at stage-level because cancellation happens at stage-level
JobIdentifier jobIdentifier = job.getIdentifier();
synchronized (mutexForStageInstance(jobIdentifier)) {
JobInstance instance = jobInst... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | updateAssignedInfo | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public String mutexForJob(JobIdentifier jobIdentifier) {
return String.format("%s_forJobInstance_%s", getClass().getName(), jobIdentifier.buildLocator()).intern();
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | mutexForJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
public void failJob(JobInstance instance) {
synchronized (mutexForStageInstance(instance.getIdentifier())) {
stageService.failJob(instance);
}
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | failJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public Stage create(final String pipelineName, final String stageName, final SchedulingContext context) {
return goConfigService.scheduleStage(pipelineName, stageName, context);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | create | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void nullStage(String stageName) {
throw new RuntimeException(String.format("Stage [%s] not found", stageName));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | nullStage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void cantSchedule(String description, String pipelineName, String stageName) {
throw new RuntimeException(description);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cantSchedule | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void noOperatePermission(String pipelineName, String stageName) {
throw new NotAuthorizedException(noOperatePermissionMessage(pipelineName, stageName));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | noOperatePermission | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void nullPipeline(String pipelineName, Integer pipelineCounter, String stageName) {
throw new RecordNotFoundException(String.format("Pipeline instance [%s/%s] not found", pipelineName, pipelineCounter));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | nullPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void previousStageNotRun(String pipelineName, String stageName) {
throw new RuntimeException(previousStageNotRunMessage(pipelineName, stageName));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | previousStageNotRun | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
protected String previousStageNotRunMessage(String pipelineName, String stageName) {
return String.format("Can not run stage [%s] in pipeline [%s] because its previous stage has not been run.", stageName, pipelineName);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | previousStageNotRunMessage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void cantSchedule(CannotScheduleException e, String pipelineName) {
throw e;
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cantSchedule | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
protected String noOperatePermissionMessage(String pipelineName, String stageName) {
return String.format("User does not have operate permissions for stage [%s] of pipeline [%s]", stageName, pipelineName);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | noOperatePermissionMessage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void cantSchedule(String description, String pipelineName, String stageName) {
result.conflict(description, description, stageScopedHealthState(pipelineName, stageName));
super.cantSchedule(description, pipelineName, stageName);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cantSchedule | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
private HealthStateType stageScopedHealthState(String pipelineName, String stageName) {
return HealthStateType.general(HealthStateScope.forStage(pipelineName, stageName));
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | stageScopedHealthState | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void previousStageNotRun(String pipelineName, String stageName) {
String message = previousStageNotRunMessage(pipelineName, stageName);
result.badRequest(message, message, stageScopedHealthState(pipelineName, stageName));
super.previousStageNotRun(pipelineNam... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | previousStageNotRun | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void noOperatePermission(String pipelineName, String stageName) {
String message = noOperatePermissionMessage(pipelineName, stageName);
result.forbidden(message, message, stageScopedHealthState(pipelineName, stageName));
super.noOperatePermission(pipelineName... | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | noOperatePermission | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void cantSchedule(CannotScheduleException e, String pipelineName) {
result.conflict(e.getMessage(), e.getMessage(), stageScopedHealthState(pipelineName, e.getStageName()));
super.cantSchedule(e, pipelineName);
} | IMPORTANT: this method is only meant for TOP level usage(never use this within a transaction). It gobbles exception. | cantSchedule | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/ScheduleService.java | Apache-2.0 |
@Override
public void check(OperationResult result) {
if (!lockService.canScheduleStageInPipeline(pipeline)) {
result.notAcceptable(String.format("Pipeline %s is locked.", pipeline.getName()), HealthStateType.general(HealthStateScope.GLOBAL));
}
} | Understands if a Stage can be scheduled in a locked pipeline | check | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageLockChecker.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageLockChecker.java | Apache-2.0 |
void cancelJob(final JobInstance jobInstance) {
changeJob(() -> jobInstanceService.cancelJob(jobInstance), jobInstance.getIdentifier());
} | Go through ScheduleService.cancelJob so that stageLevel synchronization is done | cancelJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
void failJob(final JobInstance jobInstance) {
changeJob(() -> jobInstanceService.failJob(jobInstance), jobInstance.getIdentifier());
} | Go through ScheduleService.failJob so that stageLevel synchronization is done | failJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
private void changeJob(final JobOperation jobOperation, final JobIdentifier identifier) {
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
jobOperation.invoke();
... | Go through ScheduleService.failJob so that stageLevel synchronization is done | changeJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
jobOperation.invoke();
stageDao.clearCachedStage(identifier.getStageIdentifier());
Stage stage = stageDao.findStageWithIdentifier(identifier.getStageIdentifier());
... | Go through ScheduleService.failJob so that stageLevel synchronization is done | doInTransactionWithoutResult | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
public boolean isStageActive(String pipelineName, String stageName) {
return stageDao.isStageActive(pipelineName, stageName);
} | Go through ScheduleService.failJob so that stageLevel synchronization is done | isStageActive | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
public boolean isAnyStageActiveForPipeline(PipelineIdentifier pipelineIdentifier) {
return stageDao.findAllStagesFor(pipelineIdentifier.getName(), pipelineIdentifier.getCounter()).isAnyStageActive();
} | Go through ScheduleService.failJob so that stageLevel synchronization is done | isAnyStageActiveForPipeline | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
public List<Stage> oldestStagesWithDeletableArtifacts() {
return stageDao.oldestStagesHavingArtifacts();
} | Go through ScheduleService.failJob so that stageLevel synchronization is done | oldestStagesWithDeletableArtifacts | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
public List<StageIdentity> findLatestStageInstances() {
return stageDao.findLatestStageInstances();
} | Go through ScheduleService.failJob so that stageLevel synchronization is done | findLatestStageInstances | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/StageService.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/StageService.java | Apache-2.0 |
@Override
public BuildCause onModifications(MaterialRevisions materialRevisions, boolean materialConfigurationChanged, MaterialRevisions previousMaterialRevisions) {
if (materialRevisions == null || materialRevisions.isEmpty()) {
throw new RuntimeException("Cannot find modifications, please chec... | Understands builds that are triggered by a timer | onModifications | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
@Override
public BuildCause onEmptyModifications(PipelineConfig pipelineConfig, MaterialRevisions materialRevisions) {
if (pipelineConfig.getTimer() != null && pipelineConfig.getTimer().shouldTriggerOnlyOnChanges()) {
return null;
}
return onModifications(materialRevisions, false... | Understands builds that are triggered by a timer | onEmptyModifications | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
@Override
public void canProduce(PipelineConfig pipelineConfig, SchedulingCheckerService schedulingChecker,
ServerHealthService serverHealthService,
OperationResult operationResult) {
schedulingChecker.canTriggerPipelineWithTimer(pipelineConfig, operatio... | Understands builds that are triggered by a timer | canProduce | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
@Override
public boolean isValidBuildCause(PipelineConfig pipelineConfig, BuildCause buildCause) {
return true;
} | Understands builds that are triggered by a timer | isValidBuildCause | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
@Override
public boolean shouldCheckWhetherOlderRunsHaveRunWithLatestMaterials() {
return false;
} | Understands builds that are triggered by a timer | shouldCheckWhetherOlderRunsHaveRunWithLatestMaterials | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
@Override
public void notifyPipelineNotScheduled(PipelineConfig pipelineConfig) {
LOGGER.info("Skipping scheduling of timer-triggered pipeline '{}' as it has previously run with the latest material(s).", pipelineConfig.name());
} | Understands builds that are triggered by a timer | notifyPipelineNotScheduled | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimedBuild.java | Apache-2.0 |
public void initialize() {
scheduleAllJobs(goConfigService.getAllPipelineConfigs());
goConfigService.register(this);
goConfigService.register(pipelineConfigChangedListener());
} | Understands scheduling pipelines based on a timer | initialize | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
protected EntityConfigChangedListener<PipelineConfig> pipelineConfigChangedListener() {
return new EntityConfigChangedListener<>() {
@Override
public void onEntityConfigChange(PipelineConfig pipelineConfig) {
unscheduleJob(CaseInsensitiveString.str(pipelineConfig.name()))... | Understands scheduling pipelines based on a timer | pipelineConfigChangedListener | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
@Override
public void onEntityConfigChange(PipelineConfig pipelineConfig) {
unscheduleJob(CaseInsensitiveString.str(pipelineConfig.name()));
scheduleJob(quartzScheduler, pipelineConfig);
} | Understands scheduling pipelines based on a timer | onEntityConfigChange | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private void scheduleAllJobs(List<PipelineConfig> pipelineConfigs) {
for (PipelineConfig pipelineConfig : pipelineConfigs) {
scheduleJob(quartzScheduler, pipelineConfig);
}
} | Understands scheduling pipelines based on a timer | scheduleAllJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private void scheduleJob(Scheduler scheduler, PipelineConfig pipelineConfig) {
TimerConfig timer = pipelineConfig.getTimer();
if (timer != null) {
try {
CronTrigger trigger = newTrigger()
.withIdentity(triggerKey(CaseInsensitiveString.str(pipelineConfi... | Understands scheduling pipelines based on a timer | scheduleJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private void showPipelineError(PipelineConfig pipelineConfig, Exception e, String msg, String description) {
LOG.error(msg, e);
serverHealthService.update(
ServerHealthState.error(msg,
description,
HealthStateType.general(HealthStateScope.f... | Understands scheduling pipelines based on a timer | showPipelineError | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private JobDataMap jobDataMapFor(PipelineConfig pipelineConfig) {
JobDataMap map = new JobDataMap();
map.put(BUILD_CAUSE_PRODUCER_SERVICE, buildCauseProducerService);
map.put(MAINTENANCE_MODE_SERVICE, maintenanceModeService);
map.put(PIPELINE_CONFIG, pipelineConfig);
return map;
... | Understands scheduling pipelines based on a timer | jobDataMapFor | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
@Override
public void onConfigChange(CruiseConfig newCruiseConfig) {
unscheduleAllJobs();
scheduleAllJobs(newCruiseConfig.getAllPipelineConfigs());
} | Understands scheduling pipelines based on a timer | onConfigChange | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private void unscheduleAllJobs() {
try {
Set<JobKey> jobKeys = quartzScheduler.getJobKeys(groupEquals(PIPELINE_TRIGGGER_TIMER_GROUP));
for (JobKey jobKey : jobKeys) {
unscheduleJob(jobKey.getName());
}
} catch (SchedulerException e) {
LOG.e... | Understands scheduling pipelines based on a timer | unscheduleAllJobs | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
private void unscheduleJob(String pipelineName) {
try {
JobKey jobKey = jobKey(pipelineName, PIPELINE_TRIGGGER_TIMER_GROUP);
if (quartzScheduler.getJobDetail(jobKey) != null) {
quartzScheduler.unscheduleJob(triggerKey(pipelineName, PIPELINE_TRIGGGER_TIMER_GROUP));
... | Understands scheduling pipelines based on a timer | unscheduleJob | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
@Override
public void execute(JobExecutionContext context) {
JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
BuildCauseProducerService buildCauseProducerService = (BuildCauseProducerService) jobDataMap.get(BUILD_CAUSE_PRODUCER_SERVICE);
MaintenanceModeService ... | Understands scheduling pipelines based on a timer | execute | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/TimerScheduler.java | Apache-2.0 |
@Override
public ServerHealthState success(HealthStateType healthStateType) {
ServerHealthState state = ServerHealthState.success(healthStateType);
serverHealthService.update(state);
return state;
} | Understands updating server health information relating to disk space | success | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState error(String message, String description, HealthStateType type) {
ServerHealthState state = ServerHealthState.error(message, description, type);
serverHealthService.update(state);
canContinue = false;
return state;
} | Understands updating server health information relating to disk space | error | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState warning(String message, String description, HealthStateType type) {
ServerHealthState state = ServerHealthState.warning(message, description, type);
serverHealthService.update(state);
canContinue = false;
return state;
} | Understands updating server health information relating to disk space | warning | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState getServerHealthState() {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | getServerHealthState | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public boolean canContinue() {
return canContinue;
} | Understands updating server health information relating to disk space | canContinue | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState forbidden(String message, String description, HealthStateType id) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | forbidden | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void conflict(String message, String description, HealthStateType healthStateType) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | conflict | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void notFound(String message, String description, HealthStateType healthStateType) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | notFound | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void accepted(String message, String description, HealthStateType healthStateType) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | accepted | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void ok(String message) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | ok | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void notAcceptable(String message, final HealthStateType type) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | notAcceptable | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void internalServerError(String message, HealthStateType type) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | internalServerError | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void insufficientStorage(String message, String description, HealthStateType type) {
error(message, description, type);
} | Understands updating server health information relating to disk space | insufficientStorage | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void notAcceptable(String message, String description, final HealthStateType type) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | notAcceptable | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void unprocessableEntity(String message, String description, HealthStateType healthStateType) {
throw new RuntimeException("Not yet implemented");
} | Understands updating server health information relating to disk space | unprocessableEntity | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
@Override
public void badRequest(String message, String description, HealthStateType healthStateType) {
error(message, description, healthStateType);
} | Understands updating server health information relating to disk space | badRequest | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/DiskSpaceOperationResult.java | Apache-2.0 |
private ServerHealthState kickMe(ServerHealthState whatWentWrong, boolean isEverythingOk) {
canContinue = isEverythingOk;
serverHealthService.update(whatWentWrong);
state = whatWentWrong;
return whatWentWrong;
} | Understands how to report results of common operations to the user | kickMe | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState error(String message, String description, HealthStateType type) {
return kickMe(ServerHealthState.error(message, description, type), false);
} | Understands how to report results of common operations to the user | error | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState warning(String message, String description, HealthStateType type) {
return kickMe(ServerHealthState.warning(message, description, type), false);
} | Understands how to report results of common operations to the user | warning | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | Apache-2.0 |
@Override
public ServerHealthState getServerHealthState() {
return state;
} | Understands how to report results of common operations to the user | getServerHealthState | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | Apache-2.0 |
@Override
public boolean canContinue() {
return canContinue;
} | Understands how to report results of common operations to the user | canContinue | java | gocd/gocd | server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | https://github.com/gocd/gocd/blob/master/server/src/main/java/com/thoughtworks/go/server/service/result/ServerHealthServiceUpdatingOperationResult.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.