Keep Docker crawls within usable task limits

This commit is contained in:
Nick Sweeting 2026-08-12 15:17:54 -07:00
parent 2ee3181bfa
commit df6ef35ef3
No known key found for this signature in database
2 changed files with 11 additions and 2 deletions

View File

@ -1181,7 +1181,10 @@
if (fallback) continue;
const setupPlugins = crawl.setup_plugins || [];
if (setupPlugins.some((item) => item.status === 'started' && hookText(item).includes('chrome launch'))) {
const browserReady = setupPlugins.some((item) => (
item.status === 'succeeded' && hookText(item).includes('chrome wait')
));
if (!browserReady && setupPlugins.some((item) => item.status === 'started' && hookText(item).includes('chrome launch'))) {
fallback = {
type: 'placeholder',
crawl,
@ -1193,7 +1196,12 @@
continue;
}
const openingSnapshot = (crawl.active_snapshots || []).find((snapshot) => {
return !Array.isArray(snapshot) && (snapshot.all_plugins || []).some((item) => (
if (Array.isArray(snapshot)) return false;
const plugins = snapshot.all_plugins || [];
const tabReady = plugins.some((item) => (
item.status === 'succeeded' && hookText(item).includes('chrome wait')
));
return !tabReady && plugins.some((item) => (
item.status === 'started' && hookText(item).includes('chrome tab')
));
});

View File

@ -22,6 +22,7 @@ services:
- ./data:/data
# Override abx-dl's nested VOLUME so profiles persist across containers.
- ./data/personas:/data/personas
pids_limit: 2048 # avoids low systemd task caps with Chrome and parallel extractors
environment:
# - ADMIN_USERNAME=admin # creates an admin user on first run with the given user/pass combo
# - ADMIN_PASSWORD=SomeSecretPassword