Create a new export data file This is run on first load session, session object project, project object Designed for external consumptions returns {"success" : True} if successfully Security model this is an internal function export web DOES the validati
(
session,
project,
export_id,
member,
version = None,
working_dir = None)
| 30 | |
| 31 | |
| 32 | def new_external_export( |
| 33 | session, |
| 34 | project, |
| 35 | export_id, |
| 36 | member, |
| 37 | version = None, |
| 38 | working_dir = None): |
| 39 | """ |
| 40 | Create a new export data file |
| 41 | |
| 42 | This is run on first load |
| 43 | |
| 44 | session, session object |
| 45 | project, project object |
| 46 | |
| 47 | |
| 48 | Designed for external consumptions |
| 49 | |
| 50 | returns {"success" : True} if successfully |
| 51 | |
| 52 | Security model |
| 53 | this is an internal function |
| 54 | |
| 55 | export web DOES the validation |
| 56 | Job_permissions.check_job_after_project_already_valid() |
| 57 | |
| 58 | """ |
| 59 | |
| 60 | logger.info("[Export processor] Started") |
| 61 | result = False |
| 62 | start_time = time.time() |
| 63 | |
| 64 | export = session.query(Export).filter( |
| 65 | Export.id == export_id).first() |
| 66 | |
| 67 | session.add(export) |
| 68 | |
| 69 | if export.source == "task": |
| 70 | |
| 71 | if export.task and export.task.file: |
| 72 | # Caution export.task not task |
| 73 | |
| 74 | file_list = [export.task.file] |
| 75 | |
| 76 | if export.source == "job": |
| 77 | |
| 78 | status = None |
| 79 | if export.ann_is_complete is True: |
| 80 | status = "complete" |
| 81 | |
| 82 | task_list = Task.list( |
| 83 | session = session, |
| 84 | job_id = export.job_id, |
| 85 | status = status, |
| 86 | project_id = export.project_id, |
| 87 | limit_count = None |
| 88 | ) |
| 89 |
no test coverage detected