def setnextppm(ppms): # Move to the next scheduled [CO2] value, # update controllers to produce it, # or stop polling if done. try: ppm = next(ppms) except StopIteration: return (schedule.CancelJob()) spikeccm, bulkccm = conc2flows(ppm, spiketankppm, totalflowccm) sendflow(sio, spike, spikeccm) sendflow(sio, bulk, bulkccm)
def execute_test(lt_command, name): if name == 'SanityTest': logging.info("Starting the Sanity test....") global sanity_status sanity_status = 0 try: sanity_process = subprocess.Popen(lt_command, shell=True) sanity_process.wait(sanityTestDuration) except subprocess.TimeoutExpired: stop_sanity = f'sh {path.join(JMETER_HOME, "bin/stoptest.sh")}' subprocess.call(stop_sanity, shell=True) logging.info("Finished the Sanity test....") schedule.CancelJob() else: logging.info("Starting the Load test....") global run_status run_status = 0 test_start_time = datetime.now() subprocess.Popen(lt_command, shell=True).wait() test_end_time = datetime.now() # global test_duration # test_duration = float((test_end_time - test_start_time).seconds) logging.info("Finished the Load test....") schedule.CancelJob()
def cancel_job(): schedule.CancelJob()
def run(self): super().run() return schedule.CancelJob()
def _stop_recording_job(self, session): self._recorder.end_session_recording( session, videoname=self._args["--video-name"]) return schedule.CancelJob()
def _start_recording_job(self, session): self._recorder.record_session(session) return schedule.CancelJob()
def run(self): # This prevents the job from running more than once self.should_run = False super().run() return schedule.CancelJob()