In context of having a completed file Start actual media processing (Rest of "processing" here generally refers to binary data) note we close the session usually in this context so we pass input ID instead of input object
(self, input)
| 168 | return |
| 169 | |
| 170 | def start_media_processing(self, input): |
| 171 | """ |
| 172 | In context of having a completed file |
| 173 | Start actual media processing |
| 174 | (Rest of "processing" here generally refers to binary |
| 175 | data) |
| 176 | |
| 177 | note we close the session usually in this context |
| 178 | so we pass input ID instead of input object |
| 179 | """ |
| 180 | |
| 181 | item = PrioritizedItem( |
| 182 | priority = 100, |
| 183 | media_type = input.media_type, # For routing to right queue |
| 184 | input_id = input.id) |
| 185 | |
| 186 | process_media_queue_manager.router(item) |
| 187 | |
| 188 | user = User.get(session = self.session) |
| 189 | kind = 'input_from_upload_UI' |
| 190 | if user is None: |
| 191 | kind = 'input_from_api_call' |
| 192 | |
| 193 | Event.new( |
| 194 | session = self.session, |
| 195 | kind = kind, |
| 196 | member_id = user.member_id if user else None, |
| 197 | success = True, |
| 198 | project_id = self.project.id, |
| 199 | description = f"{str(input.media_type)} {str(self.project.project_string_id)}", |
| 200 | input_id = input.id |
| 201 | ) |
| 202 | |
| 203 | def process_chunk(self, request, input): |
| 204 | """ |
no test coverage detected