mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
b959e5e6bf
Three related changes hardening the remote downloader, bundled because the module-path rename touches every file — splitting would leave a mid-history commit that doesn't build. Engine supervision: a managed engine subprocess (aria2c / qbittorrent-nox) that exits unexpectedly now crashes the worker. watchEngineProcess waits on the child, logs the exit at error level, and cancels the run context so `downloader up` returns non-zero; the container (restart: unless-stopped) then restarts the whole stack. Previously the exit error was discarded and the worker kept heartbeating as healthy while every task failed against the dead RPC. A deliberate shutdown kill is told apart from a crash via a stopping flag. aria2 GID recovery: waitAria2 re-discovers the live GID via findTask when aria2 reports 'GID ... is not found' mid-download (e.g. after an aria2 restart) instead of failing the task. Adds isAria2GIDNotFound, which matches tellStatus's message format that isAria2DownloadNotFound missed. CLI install: move the entrypoint to the module root (cmd/main.go) and rename the module github.com/saltbo/zpan/cmd -> github.com/saltbo/zpan so `go install .` from cmd/ yields a zpan binary. Internal imports shorten to github.com/saltbo/zpan/internal/...; the Dockerfile builds the module root. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.6 KiB
Modula-2
42 lines
1.6 KiB
Modula-2
module github.com/saltbo/zpan
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/Braurbeki/arigo v0.0.7
|
|
github.com/autobrr/go-qbittorrent v1.16.0
|
|
github.com/cenkalti/rpc2 v0.0.0-20180727162946-9642ea02d0aa
|
|
github.com/docker/go-units v0.5.0
|
|
github.com/oapi-codegen/runtime v1.4.1
|
|
github.com/spf13/cobra v1.10.1
|
|
github.com/spf13/viper v1.21.0
|
|
)
|
|
|
|
require (
|
|
github.com/Masterminds/semver v1.5.0 // indirect
|
|
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
|
github.com/avast/retry-go v3.0.0+incompatible // indirect
|
|
github.com/cenkalti/hub v1.0.1-0.20160527103212-11382a9960d3 // indirect
|
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/gorilla/websocket v1.4.1 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/oschwald/geoip2-golang v1.13.0 // indirect
|
|
github.com/oschwald/maxminddb-golang v1.13.0 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
|
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
|
github.com/spf13/afero v1.15.0 // indirect
|
|
github.com/spf13/cast v1.10.0 // indirect
|
|
github.com/spf13/pflag v1.0.10 // indirect
|
|
github.com/subosito/gotenv v1.6.0 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
|
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
|
|
golang.org/x/net v0.52.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.42.0 // indirect
|
|
golang.org/x/text v0.35.0 // indirect
|
|
)
|