Exemple #1
0
def recieve_data():
    data = request.json
    insert_raw_deployment(db.Session(),
                          data['author'],
                          data['name'],
                          data['tags'].split(','),
                          datetime.now())
    return 'True'
Exemple #2
0
def recieve_data():
    data = request.json
    insert_raw_deployment(db.Session(),
                          data['author'],
                          data['name'],
                          data['tags'].split(','),
                          datetime.now())
    return 'True'
Exemple #3
0
def add_dummy():
    """
    Add a dummy module download every time this is hit
    """

    insert_raw_deployment(db.Session(), 'nibz', 'puppetboard',
                          ['awesome', 'ci', 'production'],
                          datetime.datetime.utcnow())
    return 'True'
Exemple #4
0
def add_dummy():
    """
    Add a dummy module download every time this is hit
    """

    insert_raw_deployment(db.Session(),
                          'nibz',
                          'puppetboard',
                          ['awesome', 'ci', 'production'],
                          datetime.datetime.utcnow())
    return 'True'
Exemple #5
0
def recieve_data():
    data = request.json
    try:
        author = data['author']
        module = data['name']
    except (KeyError, TypeError):
        abort(400)

    try:
        tags = data['tags']
    except KeyError:
        tags = []
    else:
        tags = tags.split(',')
    insert_raw_deployment(db.Session(), author, module, tags,
                          datetime.datetime.utcnow())
    return 'True'
Exemple #6
0
def recieve_data():
    data = request.json
    try:
        author = data['author']
        module = data['name']
    except (KeyError, TypeError):
        abort(400)

    try:
        tags = data['tags']
    except KeyError:
        tags = []
    else:
        tags = tags.split(',')
    insert_raw_deployment(db.Session(),
                          author,
                          module,
                          tags,
                          datetime.datetime.utcnow())
    return 'True'