Beispiel #1
0
def list():
    _clean_tasks()

    result = generic.list(object_type)

    if flask.request.method == "POST":
        data = flask.request.json
        if "node_id" in data:
            task_semaphore = "task-for-%s" % data["node_id"]
            flask.current_app.logger.debug("notifying event %s" % task_semaphore)
            utility.notify(task_semaphore)

    return result
Beispiel #2
0
def list():
    _clean_tasks()

    result = generic.list(object_type)

    if flask.request.method == 'POST':
        data = flask.request.json
        if 'node_id' in data:
            task_semaphore = 'task-for-%s' % data['node_id']
            flask.current_app.logger.debug('notifying event %s' %
                                           task_semaphore)
            utility.notify(task_semaphore)

    return result
Beispiel #3
0
def list():
    return generic.list(object_type)