driver/pipeline.py
def _update_job(
    scheduler: BlockingScheduler,
    old_config: DriverConfig,
    new_config: DriverConfig,
    job_id: str,
    interval: int,
) -> None:
    "Helper to update pre-existing job"
    logging.info("Found new config (job %s)...", job_id)
    # grab old interval before modification
    old_interval = _get_interval(old_config, job_id)
    scheduler.modify_job(job_id, args=[new_config, job_id])
    if old_interval != interval:
        scheduler.reschedule_job(job_id, trigger="interval", seconds=interval)
        logging.info(
            "Running driver pipeline every %d seconds (job %s).", interval, job_id
        )
Helper to update pre-existing job
Helper to update pre-existing job
Helper to update pre - existing job
def _update_job(
    scheduler: BlockingScheduler,
    old_config: DriverConfig,
    new_config: DriverConfig,
    job_id: str,
    interval: int,
) -> None:
    logging.info("Found new config (job %s)...", job_id)
    old_interval = _get_interval(old_config, job_id)
    scheduler.modify_job(job_id, args=[new_config, job_id])
    if old_interval != interval:
        scheduler.reschedule_job(job_id, trigger="interval", seconds=interval)
        logging.info(
            "Running driver pipeline every %d seconds (job %s).", interval, job_id
        )
def _update_job ( scheduler : BlockingScheduler , old_config : DriverConfig , new_config : DriverConfig , job_id : str , interval : int , ) -> None : logging . info ( "Found new config (job %s)..." , job_id ) old_interval = _get_interval ( old_config , job_id ) scheduler . modify_job ( job_id , args = [ new_config , job_id ] ) if old_interval != interval : scheduler . reschedule_job ( job_id , trigger = "interval" , seconds = interval ) logging . info ( "Running driver pipeline every %d seconds (job %s)." , interval , job_id )
Helper to update pre-existing job
Helper to update pre - existing job
"Helper to update pre-existing job" # grab old interval before modification
scheduler
BlockingScheduler
old_config
DriverConfig
new_config
DriverConfig
job_id
str
interval
int