Ejemplo n.º 1
0
def import_library(path, args):
    last_updated = DATABASE.get_library_last_updated(path, args)
    if last_updated:
        if time.time() - last_updated > 10.0:
            _refresh_library(path, args)
        return DATABASE.fetch_library_keywords(path, args)
    return _get_import_result_from_process(path, args)
Ejemplo n.º 2
0
def _get_keywords_to_db(path, args):
    keywords = _get_keywords(path, args)
    DATABASE.insert_library_keywords(path, args, keywords)
    return keywords