mongo_suppor_7.py 298 B

123456789101112
  1. def json_from_results(results):
  2. to_upload = []
  3. d0 = get_local_keys()
  4. for i, result in enumerate(results):
  5. d1 = json_from_result(result)
  6. d1['_id'] = d0['upload_event_id'] + '-%d' % i
  7. d1.update(d0)
  8. to_upload.append(d1)
  9. return to_upload