mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Coordinate one-off Compose runners with server
This commit is contained in:
parent
d479dbe4d1
commit
8f87b64f09
@ -1579,7 +1579,12 @@ class Process(ModelWithDeleteAfter, models.Model):
|
||||
"""
|
||||
cleaned = 0
|
||||
|
||||
stale = cls.objects.filter(status=cls.StatusChoices.RUNNING)
|
||||
# Top-level commands own their lifecycle and may run in another Docker
|
||||
# PID namespace while sharing this database. Their takeover helpers
|
||||
# validate and finalize them; local psutil cannot do so safely.
|
||||
stale = cls.objects.filter(status=cls.StatusChoices.RUNNING).exclude(
|
||||
process_type__in=(cls.TypeChoices.SERVER, cls.TypeChoices.ADD, cls.TypeChoices.UPDATE),
|
||||
)
|
||||
if machine is not None:
|
||||
stale = stale.filter(machine=machine)
|
||||
|
||||
|
||||
@ -22,6 +22,8 @@ services:
|
||||
- ./data:/data
|
||||
# Override abx-dl's nested VOLUME so profiles persist across containers.
|
||||
- ./data/personas:/data/personas
|
||||
# Let one-off `docker compose run` commands reuse the server's supervisor.
|
||||
- tmp:/tmp/archivebox
|
||||
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
|
||||
@ -122,3 +124,6 @@ services:
|
||||
# allow_other: 'true'
|
||||
# vfs_cache_mode: full
|
||||
# poll_interval: 0
|
||||
|
||||
volumes:
|
||||
tmp:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user