watchme.tasks package¶
Submodules¶
watchme.tasks.worker module¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
class
watchme.tasks.worker.
Workers
(workers=None, show_progress=False)[source]¶ Bases:
object
-
run
(funcs, tasks)[source]¶ run will send a list of tasks, a tuple with arguments, through a function. the arguments should be ordered correctly.
- Parameters
funcs (the functions to run with multiprocessing.pool, a dictionary) – with lookup by the task name
tasks (a dict of tasks, each task name (key) with a) – tuple of arguments to process
-
Module contents¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
class
watchme.tasks.
TaskBase
(name, params=None, **kwargs)[source]¶ Bases:
object
-
export_params
(active='true')[source]¶ export parameters, meaning returning a dictionary of the task parameters plus the addition of the task type and active status.
-
run
()[source]¶ run an isolated task, meaning no update or communication with the watcher. This will return the raw result.
-
set_params
(params)[source]¶ iterate through parameters, set into dictionary.
- Parameters
params (a list of key@value pairs to set.)
-