public void stopRunning( StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface ) throws KettleException { if ( data.executorJob != null ) { data.executorJob.stopAll(); } }
public void stopAll() { // Stop the job execution. if ( data.executorJob != null ) { data.executorJob.stopAll(); } // Also stop this step super.stopAll(); }
@GET @Path( "/stop/{id : .+}" ) @Produces( { MediaType.APPLICATION_JSON } ) public JobStatus stopJob( @PathParam( "id" ) String id ) { Job job = CarteResource.getJob( id ); job.stopAll(); return getJobStatus( id ); }
@Override public void run() { try { endProcessing(); } catch ( Exception e ) { log.logError( BaseMessages.getString( PKG, "Job.Exception.UnableToPerformIntervalLogging" ), e ); // Also stop the show... // errors.incrementAndGet(); stopAll(); } } };
/** * Execute this job entry and return the result. In this case it means, just set the result boolean in the Result * class. * * @param previousResult * The result of the previous execution * @return The Result of the execution. */ public Result execute( Result previousResult, int nr ) { previousResult.setResult( evaluate( previousResult ) ); // we fail so stop // job execution parentJob.stopAll(); return previousResult; }
public synchronized void stopJob() { if ( job != null && job.isActive() && job.isInitialized() ) { job.stopAll(); job.waitUntilFinished( 5000 ); // wait until everything is stopped, maximum 5 seconds... log.logMinimal( BaseMessages.getString( PKG, "JobLog.Log.JobWasStopped" ) ); } setControlStates(); }