[Unit]
Description=OSBuild Composer Worker (%i)
Requires=osbuild-local-worker.socket
After=multi-user.target osbuild-local-worker.socket

[Service]
Type=simple
PrivateTmp=true
ExecStart=/usr/libexec/osbuild-composer/osbuild-worker -unix /run/osbuild-composer/job.socket
Restart=always
RestartSec=1s
CPUSchedulingPolicy=batch
IOSchedulingClass=idle
CacheDirectory=osbuild-worker
# systemd >= 240 sets this, but osbuild-worker runs on earlier versions
Environment="CACHE_DIRECTORY=/var/cache/osbuild-worker"

[Install]
WantedBy=osbuild-composer.service
