mirror of https://github.com/CIRCL/lookyloo
fix: Properly catch broken settings in bg processing
parent
de4a48310d
commit
54deae4783
|
@ -14,7 +14,7 @@ from lacuscore import CaptureStatus as CaptureStatusCore, CaptureSettingsError
|
||||||
from lookyloo import Lookyloo
|
from lookyloo import Lookyloo
|
||||||
from lookyloo.exceptions import LacusUnreachable
|
from lookyloo.exceptions import LacusUnreachable
|
||||||
from lookyloo.default import AbstractManager, get_config, get_homedir, safe_create_dir
|
from lookyloo.default import AbstractManager, get_config, get_homedir, safe_create_dir
|
||||||
from lookyloo.helpers import ParsedUserAgent, serialize_to_json
|
from lookyloo.helpers import ParsedUserAgent, serialize_to_json, CaptureSettings
|
||||||
from pylacus import CaptureStatus as CaptureStatusPy
|
from pylacus import CaptureStatus as CaptureStatusPy
|
||||||
|
|
||||||
logging.config.dictConfig(get_config('logging'))
|
logging.config.dictConfig(get_config('logging'))
|
||||||
|
@ -110,7 +110,8 @@ class Processing(AbstractManager):
|
||||||
self.logger.info(f'Found a non-queued capture ({uuid}), retrying now.')
|
self.logger.info(f'Found a non-queued capture ({uuid}), retrying now.')
|
||||||
# This capture couldn't be queued and we created the uuid locally
|
# This capture couldn't be queued and we created the uuid locally
|
||||||
try:
|
try:
|
||||||
if query := self.lookyloo.get_capture_settings(uuid):
|
if capture_settings := self.lookyloo.redis.hgetall(uuid):
|
||||||
|
query = CaptureSettings(**capture_settings)
|
||||||
try:
|
try:
|
||||||
new_uuid = self.lookyloo.lacus.enqueue(
|
new_uuid = self.lookyloo.lacus.enqueue(
|
||||||
url=query.url,
|
url=query.url,
|
||||||
|
|
Loading…
Reference in New Issue