(session,
project_string_id,
export_id,
member,
)
| 147 | |
| 148 | |
| 149 | def export_web_core(session, |
| 150 | project_string_id, |
| 151 | export_id, |
| 152 | member, |
| 153 | ): |
| 154 | project = Project.get(session, project_string_id) |
| 155 | |
| 156 | time.sleep(.250) # Give export time to hit database |
| 157 | |
| 158 | export = Export.get_by_id(session, export_id) |
| 159 | |
| 160 | if export is None: |
| 161 | |
| 162 | time.sleep(2) |
| 163 | export = Export.get_by_id(session, export_id) |
| 164 | |
| 165 | if export is None: |
| 166 | # TODO log a failure / update status better? |
| 167 | print("Error no export found, export id is:", export_id) |
| 168 | return False |
| 169 | |
| 170 | if not project: |
| 171 | logger.error('Error: no project given.') |
| 172 | return False |
| 173 | |
| 174 | if export.source in ["directory", "job", "task"]: |
| 175 | # user = User.get(session) |
| 176 | # TODO why not pass export object? |
| 177 | result, data = new_external_export( |
| 178 | session = session, |
| 179 | project = project, |
| 180 | export_id = export_id, |
| 181 | working_dir = export.working_dir, |
| 182 | member = member |
| 183 | ) |
no test coverage detected