Revision 796991a1aaca3b4c0ea95b308253a1cc58f4ba2a authored by Boris Sekachev on 17 January 2022, 08:13:58 UTC, committed by GitHub on 17 January 2022, 08:13:58 UTC
* Added intelligent paste labels function, added notification when remove labels from raw editor

* Adjusted raw tab behaviour

* Fixed issue with selection

* Updated version and changelog, removed previous implementation

* Removed outdated comment

* Additional checks on the server

* Added check for default boolean attr

* Updated version

* Conditionally show lost labels/attributes

* Remove labels only when create

Co-authored-by: Nikita Manovich <nikita.manovich@intel.com>
1 parent c77d956
Raw File
simpleworker.py

# Copyright (C) 2018 Intel Corporation
#
# SPDX-License-Identifier: MIT

from rq import Worker


class BaseDeathPenalty(object):
    def __init__(self, timeout, exception, **kwargs):
        pass

    def __enter__(self):
        pass

    def __exit__(self, type, value, traceback):
        pass


class SimpleWorker(Worker):
    death_penalty_class = BaseDeathPenalty

    def main_work_horse(self, *args, **kwargs):
        raise NotImplementedError("Test worker does not implement this method")

    def execute_job(self, *args, **kwargs):
        """Execute job in same thread/process, do not fork()"""
        return self.perform_job(*args, **kwargs)
back to top