How to use the pyqs.task function in pyqs

To help you get started, we’ve selected a few pyqs 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 spulec / PyQS / tests / tasks.py View on Github external
@task(custom_function_path="custom_function.path", queue="foobar")
def custom_path_task():
    pass
github spulec / PyQS / tests / tasks.py View on Github external
@task()
def sleeper(message, extra=None):
    import time
    time.sleep(message)
github spulec / PyQS / tests / tasks.py View on Github external
@task(queue='email')
def send_email(subject, message):
    pass
github spulec / PyQS / tests / tasks.py View on Github external
@task()
def index_incrementer(message, extra=None):
    if isinstance(message, basestring):
        task_results.append(message)
    else:
        raise ValueError(
            "Need to be given basestring, was given {}".format(message))
github spulec / PyQS / tests / tasks.py View on Github external
@task(queue='delayed', delay_seconds=5)
def delayed_task():
    pass
github spulec / PyQS / example / api / tasks.py View on Github external
@task(queue='queue-example')
def process(message):
    logging.info(
        f'PyQS task process() is processing message {message}. '
        'Clap your hands!'