Commit 390cf12b authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Optional compress on package from tar. [skip ci]

parent edb7fc11
Pipeline #48007 skipped
......@@ -87,10 +87,11 @@ def index(drop, with_metadata, per_query):
@click.argument('tar-file', nargs=1)
@click.option('--offset', default=None, type=int, help='Start processing the tar from a specific offset, e.g. to continue')
@click.option('--upload', default=None, type=str, help='Force the whole tar contents into a given upload id')
def package_tar(tar_file, offset, upload):
@click.option('--compress', is_flag=True, help='Turn on compression for creating migration packages')
def package_tar(tar_file, offset, upload, compress):
infrastructure.setup_logging()
infrastructure.setup_mongo()
Package.create_packages_from_tar(tar_file, offset=offset, compress=True, forced_upload_id=upload)
Package.create_packages_from_tar(tar_file, offset=offset, compress=compress, forced_upload_id=upload)
@migration.command(help='Reset migration version to start a new migration.')
......
......@@ -1442,7 +1442,6 @@ class NomadCOEMigration:
if len(calc_mainfiles) > 0 and (republish or not upload.published):
with utils.timer(logger, 'upload published'):
upload_metadata = dict(with_embargo=(package.restricted > 0))
# TODO sample metadata from calcs in upload for new calcs
upload_metadata['calculations'] = [
self._to_api_metadata(source_calc_with_metadata)
for _, source_calc_with_metadata in source_calcs.values()]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment