Ajustes de rendering
This commit is contained in:
@@ -70,7 +70,7 @@ class VideoPipeline:
|
||||
return self._build_success_payload(context)
|
||||
except Exception as exc:
|
||||
logger.exception("Falha ao processar vídeo %s", context.job.filename)
|
||||
return self._handle_failure(context, exc)
|
||||
# return self._handle_failure(context, exc)
|
||||
|
||||
def _parse_job(self, message: Dict[str, Any]) -> JobMessage:
|
||||
filename = message.get("filename")
|
||||
@@ -200,25 +200,25 @@ class VideoPipeline:
|
||||
}
|
||||
|
||||
def _handle_failure(self, context: PipelineContext, exc: Exception) -> Dict[str, Any]:
|
||||
logger.error("Erro no pipeline: %s", exc)
|
||||
cleanup_targets: List[Path] = []
|
||||
logger.error("Erro na pipeline: %s", exc)
|
||||
# cleanup_targets: List[Path] = []
|
||||
|
||||
if context.workspace:
|
||||
cleanup_targets.append(context.workspace.workspace_dir)
|
||||
cleanup_targets.append(context.workspace.output_dir)
|
||||
original_path = context.workspace.source_path
|
||||
if original_path.exists():
|
||||
cleanup_targets.append(original_path)
|
||||
else:
|
||||
sanitized = sanitize_filename(Path(context.job.filename).stem)
|
||||
job_output_dir = self.settings.outputs_dir / sanitized
|
||||
if job_output_dir.exists():
|
||||
cleanup_targets.append(job_output_dir)
|
||||
original_path = self.settings.videos_dir / context.job.filename
|
||||
if original_path.exists():
|
||||
cleanup_targets.append(original_path)
|
||||
# if context.workspace:
|
||||
# cleanup_targets.append(context.workspace.workspace_dir)
|
||||
# cleanup_targets.append(context.workspace.output_dir)
|
||||
# original_path = context.workspace.source_path
|
||||
# if original_path.exists():
|
||||
# cleanup_targets.append(original_path)
|
||||
# else:
|
||||
# sanitized = sanitize_filename(Path(context.job.filename).stem)
|
||||
# job_output_dir = self.settings.outputs_dir / sanitized
|
||||
# if job_output_dir.exists():
|
||||
# cleanup_targets.append(job_output_dir)
|
||||
# original_path = self.settings.videos_dir / context.job.filename
|
||||
# if original_path.exists():
|
||||
# cleanup_targets.append(original_path)
|
||||
|
||||
remove_paths(cleanup_targets)
|
||||
# remove_paths(cleanup_targets)
|
||||
|
||||
return {
|
||||
"hasError": True,
|
||||
|
||||
Reference in New Issue
Block a user