How to use the paperwork.frontend.util.jobs.JobScheduler function in paperwork

To help you get started, we’ve selected a few paperwork 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 openpaperwork / paperwork / paperwork-gtk / scripts / compare_algorithms.py View on Github external
def __init__(self, nb_workers=multiprocessing.cpu_count()):
        if (len(ALGORITHMS) % nb_workers) == 0:  # for correct dispatch
            nb_workers += 1
        self.nb_workers = nb_workers
        self.schedulers = [
            JobScheduler("{}".format(nb)) for nb in range(0, self.nb_workers)
        ]
        for scheduler in self.schedulers:
            scheduler.warnings = False
        self.last_scheduler = 0
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }
github openpaperwork / paperwork / paperwork-gtk / src / paperwork / frontend / settingswindow / __init__.py View on Github external
def __init__(self, main_scheduler, mainwindow_gui, config):
        super(SettingsWindow, self).__init__()

        self.schedulers = {
            'main': main_scheduler,
            'progress': JobScheduler('progress'),
        }
        self.local_schedulers = [
            self.schedulers['progress'],
        ]

        widget_tree = load_uifile(
            os.path.join("settingswindow", "settingswindow.glade"))
        # self.widget_tree is for tests/screenshots ONLY
        self.widget_tree = widget_tree

        distrib = platform.dist()
        if distrib:
            distrib = distrib[0].lower()
            logger.info("Distribution: [%s]" % distrib)
            for widget in widget_tree.get_objects():
                if type(widget) == Gtk.LinkButton:
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }
github openpaperwork / paperwork / src / paperwork / frontend / mainwindow / __init__.py View on Github external
def __init_schedulers(self):
        return {
            'main': JobScheduler("Main"),
            'ocr': JobScheduler("OCR"),
            'page_boxes_loader': JobScheduler("Page boxes loader"),
            'progress': JobScheduler("Progress"),
            'scan': JobScheduler("Scan"),
            'index': JobScheduler("Index search / update"),
        }