mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Keep Docker crawls within usable task limits
This commit is contained in:
parent
2ee3181bfa
commit
df6ef35ef3
@ -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')
|
||||
));
|
||||
});
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user