Exemplo n.º 1
0
def process_pending():
    for e in exports.find({'status': "pending"}):
        try:
            export = Export(e)
            export.status = 'processing'
            exports.update(export.key, export.serialize())
            create_file(export)
        except Exception as e:
            export.status = 'error'
            exports.update(export.key, export.serialize())
            print(str(e))  # Keep processing files, but log it
Exemplo n.º 2
0
def process_pending():
    for e in exports.find({'status': "pending"}):
        try:
            export = Export(e)
            export.status = 'processing'
            exports.update(export.key, export.serialize())
            create_file(export)
        except Exception as e:
            export.status = 'error'
            exports.update(export.key, export.serialize())
            print(str(e))  # Keep processing files, but log it
Exemplo n.º 3
0
def list_exports(api_key, domain):
    export_list = exports.find({'domain': domain, 'user': api_key})
    return [Export(e) for e in export_list]
Exemplo n.º 4
0
def list_exports(api_key, domain):
    export_list = exports.find({
        'domain': domain,
        'user': api_key
    })
    return [Export(e) for e in export_list]