#!/usr/bin/env python import os import sys import time import subprocess from utils import get_md5, get_task_dict, save_output_json allowed_codes = { 'LIRI-JP', 'PACA-CA', 'PRAD-CA', 'RECA-EU', 'PAEN-AU', 'PACA-AU', 'BOCA-UK', 'OV-AU', 'MELA-AU', 'BRCA-UK', 'PRAD-UK', 'CMDI-UK', 'LINC-JP', 'ORCA-IN', 'BTCA-SG', 'LAML-KR', 'LICA-FR', 'CLLE-ES', 'ESAD-UK', 'PAEN-IT' } task_dict = get_task_dict(sys.argv[1]) cwd = os.getcwd() file_ = task_dict.get('input').get('file') file_name = task_dict.get('input').get('file_name') file_md5sum = task_dict.get('input').get('file_md5sum') object_id = task_dict.get('input').get('object_id') idx_file_ = task_dict.get('input').get('idx_file') idx_file_name = task_dict.get('input').get('idx_file_name') idx_object_id = task_dict.get('input').get('idx_object_id') idx_file_md5sum = task_dict.get('input').get('idx_file_md5sum') project_code = task_dict.get('input').get('project_code') task_start = int(time.time()) file_size = 0 idx_file_size = 0 run = False
#!/usr/bin/env python from utils import get_task_dict import json task_dict = get_task_dict(argv[1]) with open('task_json.json', 'w') as f: f.write(json.dumps(task_dict)) with open('output.json', 'w') as f: f.write(json.dumps({"task": "prepare_metadata_xml"}))