make chrome binary and configs directly runnable and make extractor use external bin

This commit is contained in:
Nick Sweeting 2024-12-06 02:04:05 -08:00
parent a572db307b
commit ac53fdf677
No known key found for this signature in database
7 changed files with 316 additions and 83 deletions

View file

@ -2,12 +2,15 @@ import hashlib
import mimetypes
import os
import subprocess
from typing import ClassVar
from datetime import timedelta
from zipfile import Path
from django.utils import timezone
from archivebox.misc.hashing import get_dir_info
from core.models import ArchiveResult
import abx
@ -205,9 +208,7 @@ class Extractor:
def after_extract(self, error: Exception | None=None):
status, retry_at = self.determine_status()
self.archiveresult.outputs = []
self.archiveresult.error = f'{type(error).__name__}: {error}' if error else None
self.archiveresult.status = self.archiveresult.StatusChoices.FAILED if error else self.archiveresult.StatusChoices.SUCCEEDED
@ -216,4 +217,4 @@ class Extractor:
self.archiveresult.output = self.archiveresult.outputs[0].path
self.archiveresult.save()
self.archiveresult.write_indexes()