Пример #1
0
    ensure_parents_completed,
    _set_state_unsafe  # TODO: get rid of _set_state_unsafe
)
maybe_add_subtask, readd_subtask, set_state, inc_retry_count,
ensure_parents_completed, _set_state_unsafe

from .read_job_state import (check_state)
check_state

from .locking import (obtain_execute_lock, is_execute_locked)
obtain_execute_lock, is_execute_locked

from .qbcli_baseapi import Lock as BaseLock
BaseLock


build_arg_parser = at.build_arg_parser([at.group(
    "Stolos Queue Backend (manages job state)",
    at.backend(
        backend_type='queue',
        default='redis',
        known_backends={
            "zookeeper": "stolos.queue_backend.qbcli_zookeeper",
            "redis": "stolos.queue_backend.qbcli_redis"},
        help=(
            'Select a database that stores job state.'
            ' This option defines which queue backend Stolos uses.'
            ' You can supply your own queue backend or choose from the'
            ' following supported options: {known_backends}')),
)])
Пример #2
0
ensure_parents_completed, _set_state_unsafe

from .read_job_state import (check_state)

check_state

from .locking import (obtain_execute_lock, is_execute_locked)

obtain_execute_lock, is_execute_locked

from .qbcli_baseapi import Lock as BaseLock

BaseLock

build_arg_parser = at.build_arg_parser([
    at.group(
        "Stolos Queue Backend (manages job state)",
        at.backend(
            backend_type='queue',
            default='redis',
            known_backends={
                "zookeeper": "stolos.queue_backend.qbcli_zookeeper",
                "redis": "stolos.queue_backend.qbcli_redis"
            },
            help=('Select a database that stores job state.'
                  ' This option defines which queue backend Stolos uses.'
                  ' You can supply your own queue backend or choose from the'
                  ' following supported options: {known_backends}')),
    )
])
Пример #3
0
        return mapping_kls(value)
    else:
        return value


def get_tasks_config():
    """
    Returns object to read Stolos application config from your chosen
    configuration backend.
    """
    ns = stolos.get_NS()
    return ns.configuration_backend()


build_arg_parser = at.build_arg_parser([at.group(
    "Application Dependency Configuration",
    at.backend(
        backend_type='configuration',
        default='json',
        known_backends={
            "json": "stolos.configuration_backend.json_config.JSONMapping",
            "redis": "stolos.configuration_backend.redis_config.RedisMapping"},
        help=(
            "Where do you store the application dependency data?"
            ' This option defines which configuration backend Stolos uses'
            ' to access the directed graph defining how your applications'
            ' depend on each other.'
            ' You can supply your own configuration backend or choose from the'
            ' following supported options: {known_backends}')),
)])
Пример #4
0
def get_tasks_config():
    """
    Returns object to read Stolos application config from your chosen
    configuration backend.
    """
    ns = stolos.get_NS()
    return ns.configuration_backend()


build_arg_parser = at.build_arg_parser([
    at.group(
        "Application Dependency Configuration",
        at.backend(
            backend_type='configuration',
            default='json',
            known_backends={
                "json": "stolos.configuration_backend.json_config.JSONMapping",
                "redis":
                "stolos.configuration_backend.redis_config.RedisMapping"
            },
            help=
            ("Where do you store the application dependency data?"
             ' This option defines which configuration backend Stolos uses'
             ' to access the directed graph defining how your applications'
             ' depend on each other.'
             ' You can supply your own configuration backend or choose from the'
             ' following supported options: {known_backends}')),
    )
])