Module pywander.crawler.todo_system

Functions

def do_nothing(*args, **kwargs)
Expand source code
def do_nothing(*args, **kwargs):
    """
    良好的工作流程最终以本函数什么都不做为结束点. 因为上一个工作流程虽然是实质工作的结束,但仍可能有部分环境变量的更改需要向主控上报.
    """
    pass

良好的工作流程最终以本函数什么都不做为结束点. 因为上一个工作流程虽然是实质工作的结束,但仍可能有部分环境变量的更改需要向主控上报.

Classes

class TodoItem (priority: int,
func: ,
args: list,
kwargs: dict,
env: dict)
Expand source code
@dataclass(order=True)
class TodoItem:
    priority: int  # 优先级 数字越小越优先执行
    func: callable
    args: list
    kwargs: dict
    env: dict  # 会影响主控程序总的环境和行为

    def __post_init__(self):
        if self.priority is None:
            self.priority = 0
        if self.args is None:
            self.args = list()
        if self.kwargs is None:
            self.kwargs = dict()
        if self.env is None:
            self.env = dict()

TodoItem(priority: int, func: , args: list, kwargs: dict, env: dict)

Instance variables

var args : list

The type of the None singleton.

var env : dict

The type of the None singleton.

var func

The type of the None singleton.

var kwargs : dict

The type of the None singleton.

var priority : int

The type of the None singleton.