How to use the tasklib.manager.PluginTaskManager function in tasklib

To help you get started, we’ve selected a few tasklib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pupil-labs / pupil / pupil_src / shared_modules / eye_movement_detector.py View on Github external
def __init__(self, g_pool, show_segmentation=True):
        super().__init__(g_pool)
        self.show_segmentation = show_segmentation
        self.current_segment_index = None
        self.current_segment_details = None
        self.eye_movement_detection_yields = deque()
        self.status = ""

        self.task_manager = PluginTaskManager(self)
        self.eye_movement_task = None

        self.notify_all(
            {"subject": Notification_Subject.SHOULD_RECALCULATE, "delay": 0.5}
        )
github pupil-labs / pupil / pupil_src / shared_modules / head_pose_tracker / offline_head_pose_tracker.py View on Github external
def __init__(self, g_pool):
        super().__init__(g_pool)

        self._task_manager = PluginTaskManager(plugin=self)
        self._current_recording_uuid = str(
            PupilRecording(g_pool.rec_dir).meta_info.recording_uuid
        )

        self._setup_storages()
        self._setup_controllers()
        self._setup_renderers()
        self._setup_menus()
        self._setup_timelines()
github pupil-labs / pupil / pupil_src / shared_modules / gaze_producer / gaze_from_offline_calibration.py View on Github external
def __init__(self, g_pool):
        super().__init__(g_pool)

        self.inject_plugin_dependencies()

        self._task_manager = PluginTaskManager(plugin=self)

        self._recording_uuid = self._load_recording_uuid_from_info_csv()

        self._setup_storages()
        self._setup_controllers()
        self._setup_ui()
        self._setup_timelines()

        self._pupil_changed_listener = data_changed.Listener(
            "pupil_positions", g_pool.rec_dir, plugin=self
        )
        self._pupil_changed_listener.add_observer(
            "on_data_changed", self._calculate_all_controller.calculate_all
        )
github pupil-labs / pupil / pupil_src / shared_modules / head_pose_tracker / online_head_pose_tracker.py View on Github external
def __init__(
        self,
        g_pool,
        optimize_markers_3d_model=False,
        optimize_camera_intrinsics=True,
        open_visualization_window=False,
        show_camera_trace_in_3d_window=False,
        render_markers=True,
        show_marker_id_in_main_window=False,
        window_size=(1000, 1000),
        window_position=(90, 90),
    ):
        super().__init__(g_pool)

        self._task_manager = PluginTaskManager(plugin=self)

        self._online_settings = storage.OnlineSettings(
            (
                optimize_markers_3d_model,
                optimize_camera_intrinsics,
                open_visualization_window,
                show_camera_trace_in_3d_window,
                render_markers,
                show_marker_id_in_main_window,
                window_size,
                window_position,
            )
        )
        self._setup_storages()
        self._setup_controllers()
        self._setup_renderers()
github pupil-labs / pupil / pupil_src / shared_modules / eye_movement / controller / eye_movement_offline_controller.py View on Github external
def __init__(
        self,
        plugin,
        storage: model.Classified_Segment_Storage,
        on_started: t.Callable[[], None] = nop,
        on_status: t.Callable[[str], None] = nop,
        on_progress: t.Callable[[float], None] = nop,
        on_exception: t.Callable[[Exception], None] = nop,
        on_completed: t.Callable[[], None] = nop,
        on_canceled_or_killed: t.Callable[[], None] = nop,
        on_ended: t.Callable[[], None] = nop,
    ):
        self.g_pool = plugin.g_pool
        self.storage = storage
        self.task_manager = PluginTaskManager(plugin)
        self.eye_movement_task = None

        self._on_started = on_started
        self._on_status = on_status
        self._on_progress = on_progress
        self._on_exception = on_exception
        self._on_completed = on_completed
        self._on_canceled_or_killed = on_canceled_or_killed
        self._on_ended = on_ended