Example #1
0
def _json_highlevel(location, rotate):
    print("Creating high-level JSON data dump...")
    path = dump.dump_highlevel_json(location)
    print("Done! Created: %s" % path)

    if rotate:
        print("Removing old dumps (except two latest)...")
        remove_old_archives(location, "acousticbrainz-highlevel-json-[0-9]+.tar.bz2",
                            is_dir=False, sort_key=lambda x: os.path.getmtime(x))
Example #2
0
def _json_highlevel(location, rotate, threads, sample, files_per_archive):
    current_app.logger.info("Creating high-level JSON data dump...")
    path = dump.dump_highlevel_json(location,
                                    threads,
                                    sample,
                                    num_files_per_archive=files_per_archive)
    current_app.logger.info("Done! Created: %s", path)

    if rotate:
        current_app.logger.info("Removing old dumps (except two latest)...")
        remove_old_archives(location,
                            "acousticbrainz-highlevel-json-[0-9]+.tar.zst",
                            is_dir=False,
                            sort_key=lambda x: os.path.getmtime(x))
Example #3
0
def _incremental_json_highlevel(location, id):
    print("Creating incremental high-level JSON data dump...")
    path = dump.dump_highlevel_json(location, incremental=True, dump_id=id)
    print("Done! Created: %s\n" % path)
def _incremental_json_highlevel(location, id):
    current_app.logger.info(
        "Creating incremental high-level JSON data dump...")
    path = dump.dump_highlevel_json(location, incremental=True, dump_id=id)
    current_app.logger.info("Done! Created: %s\n" % path)
Example #5
0
 def test_dump_highlevel_json(self):
     path = dump.dump_highlevel_json(self.temp_dir)
     self.assertTrue(os.path.isfile(path))
Example #6
0
 def test_dump_highlevel_json(self):
     path = dump.dump_highlevel_json(self.temp_dir)
     self.assertTrue(os.path.isfile(path))
Example #7
0
def _incremental_json_highlevel(location, id):
    print("Creating incremental high-level JSON data dump...")
    path = dump.dump_highlevel_json(location, incremental=True, dump_id=id)
    print("Done! Created: %s\n" % path)