Package org.candlepin.pinsetter.core.model

Examples of org.candlepin.pinsetter.core.model.JobStatus.update()


            if (endDt != null && startDt != null) {
                time = endDt.getTime() - startDt.getTime();
            }
            when(context.getJobRunTime()).thenReturn(time);
            when(context.getResult()).thenReturn(result);
            status.update(context);
            if (state != null) {
                status.setState(state);
            }
            return curator.create(status);
        }
View Full Code Here


        when(ctx.getFireTime()).thenReturn(new Date());
        when(ctx.getJobRunTime()).thenReturn(1000L);
        when(ctx.getResult()).thenReturn(longstr);

        JobStatus status = newJobStatus().owner("terps").create();
        status.update(ctx);
        curator.merge(status);
    }

    @Test
    public void findWaitingJobsTest() {
View Full Code Here

                log.error("Job [" + status.getId() + "] failed." , exc);
                status.setState(JobState.FAILED);
                status.setResult(exc.getMessage());
            }
            else {
                status.update(ctx);
            }
            curator.merge(status);
        }
        else {
            log.debug("No jobinfo found for job: " + ctx);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.