(job_id)
Execute job in spooler.
Execute job in spooler.
Execute job in spooler .
def execute_job(job_id):
    """
    Execute job in spooler.
    """
    logger.info(f"Executing spooled job id={job_id}")
    from biostar.recipes.models import Job

    # Spend 3 seconds in queued state.
    time.sleep(3)
    Job.objects.filter(id=job_id).update(state=Job.SPOOLED)
    # Spend 3 seconds in spooled state
    time.sleep(3)

    management.call_command('job', id=job_id)
def execute_job ( job_id ) : logger . info ( f"Executing spooled job id={job_id}" ) from biostar . recipes . models import Job # Spend 3 seconds in queued state. time . sleep ( 3 ) Job . objects . filter ( id = job_id ) . update ( state = Job . SPOOLED ) # Spend 3 seconds in spooled state time . sleep ( 3 ) management . call_command ( 'job' , id = job_id )