# Path: pq/utils/concurrency.py
# ASYNC_IO = 1        # run in the worker event loop
# THREAD_IO = 3       # run in the event loop executor
# CPUBOUND = 4        # run in a subprocess


import sys
import logging
import inspect
import asyncio
from datetime import datetime, date
from pulsar.utils.slugify import slugify
from pulsar.utils.importer import import_modules
from pulsar.utils.log import lazyproperty
from pulsar.utils.string import to_bytes
from ..utils.concurrency import concurrency_name, ASYNC_IO




class ShellError(RuntimeError):

    @property
    def returncode(self):
        return self.args[1] if len(self.args) > 1 else 1


class RegistryMixin:

    @lazyproperty

# Path: pq/utils/concurrency.py
# ASYNC_IO = 1        # run in the worker event loop
# THREAD_IO = 3       # run in the event loop executor
# CPUBOUND = 4        # run in a subprocess


# Path: pq/tasks/models.py
import sys
import logging
import inspect
import asyncio
from datetime import datetime, date
from pulsar.utils.slugify import slugify
from pulsar.utils.importer import import_modules
from pulsar.utils.log import lazyproperty
from pulsar.utils.string import to_bytes
from ..utils.concurrency import concurrency_name, ASYNC_IO





class ShellError(RuntimeError):

    @property
    def returncode(self):
        return self.args[1] if len(self.args) > 1 else 1


class RegistryMixin:

    @lazyproperty

    def registry(self):