soonq/commands/commands.py
def run_work(task_clsname, task_id):
    """Run the task in the work table with the given ID."""
    # Get task from work table.
    con = sqlite3.connect(str(DB_PATH))
    with con:
        c = con.execute(
            f"""
            SELECT
                task_id,
                queue_name,
                started,
                status,
                args,
                kwargs,
                err
            FROM {WORK_TABLENAME}
            WHERE task_id = ?
            """,
            (task_id,),
        )
        _, _, _, _, task_args, task_kwargs, _ = c.fetchone()
    con.close()
    # Run task.
    task_args = pickle.loads(task_args)
    task_kwargs = pickle.loads(task_kwargs)
    exc_info = None
    task = get_taskclass(task_clsname)()
    task.run(*task_args, **task_kwargs)
    return exc_info
Run the task in the work table with the given ID.
Run the task in the work table with the given ID.
Run the task in the work table with the given ID .
def run_work(task_clsname, task_id):
    con = sqlite3.connect(str(DB_PATH))
    with con:
        c = con.execute(
            f"""
            SELECT
                task_id,
                queue_name,
                started,
                status,
                args,
                kwargs,
                err
            FROM {WORK_TABLENAME}
            WHERE task_id = ?
            """,
            (task_id,),
        )
        _, _, _, _, task_args, task_kwargs, _ = c.fetchone()
    con.close()
    task_args = pickle.loads(task_args)
    task_kwargs = pickle.loads(task_kwargs)
    exc_info = None
    task = get_taskclass(task_clsname)()
    task.run(*task_args, **task_kwargs)
    return exc_info
def run_work ( task_clsname , task_id ) : con = sqlite3 . connect ( str ( DB_PATH ) ) with con : c = con . execute ( f"""
            SELECT
                task_id,
                queue_name,
                started,
                status,
                args,
                kwargs,
                err
            FROM {WORK_TABLENAME}
            WHERE task_id = ?
            """ , ( task_id , ) , ) _ , _ , _ , _ , task_args , task_kwargs , _ = c . fetchone ( ) con . close ( ) task_args = pickle . loads ( task_args ) task_kwargs = pickle . loads ( task_kwargs ) exc_info = None task = get_taskclass ( task_clsname ) ( ) task . run ( * task_args , ** task_kwargs ) return exc_info
Run the task in the work table with the given ID.
Run the task in the work table with the given ID .
"""Run the task in the work table with the given ID.""" # Get task from work table. # Run task.
task_clsname
task_id