コード例 #1
0
ファイル: calramp.py プロジェクト: infotroph/CCIAtools
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)
コード例 #2
0
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()
コード例 #3
0
def cancel_job():
    schedule.CancelJob()
コード例 #4
0
 def run(self):
     super().run()
     return schedule.CancelJob()
コード例 #5
0
 def _stop_recording_job(self, session):
     self._recorder.end_session_recording(
         session, videoname=self._args["--video-name"])
     return schedule.CancelJob()
コード例 #6
0
 def _start_recording_job(self, session):
     self._recorder.record_session(session)
     return schedule.CancelJob()
コード例 #7
0
ファイル: scheduler.py プロジェクト: unode/mmpy_bot
    def run(self):
        # This prevents the job from running more than once
        self.should_run = False

        super().run()
        return schedule.CancelJob()