Archived
feat(scheduler): add per-level job limits based on load classification
Implements #34 - Job Limits Per Load Level Jobs are now classified into HIGH, MEDIUM, or LOW load levels based on gitignore-style whitelist files (.load files). This allows concurrent execution of different types of jobs (e.g., downloading while transcoding). Changes: - Add LoadLevel enum with default limits (HIGH=2, MEDIUM=8, LOW=32) - Add LoadLevelConfig record for per-level max jobs configuration - Add CommandMatcher sealed interface for matching commands by name/path/dir - Add LoadFileParser for parsing .load whitelist files - Add LoadLevelClassifier for auto-classifying commands - Add ConfigInstallCommand (barn config install) for default config files - Update JobScheduler to use per-level limits with EnumMap - Add --load-level/-l option to barn run for manual override - Add load level display to barn status and barn describe output - Remove --user flag from service install/uninstall (system-wide only) - Update documentation for load levels and whitelist files Default whitelists: - high.load: ffmpeg, ffprobe, handbrake, x264, x265, etc. - low.load: curl, wget, rclone, rsync, aria2c, etc. - medium.load: empty (unmatched commands default to MEDIUM) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a213788c7
commit
f233547ce8
52 files changed
+2444
-193
No files matched your search
@@ -78,6 +78,7 @@ Example:
|
||||
manifest.json
|
||||
state
|
||||
stage
|
||||
load_level
|
||||
pid
|
||||
heartbeat
|
||||
exit_code
|
||||
@@ -121,6 +122,7 @@ Written once at job creation.
|
||||
|---------------|--------------------------------------------------------|
|
||||
| `state` | `queued`, `running`, `succeeded`, `failed`, `canceled` |
|
||||
| `tag` | user defined string |
|
||||
| `load_level` | `HIGH`, `MEDIUM`, or `LOW` (for scheduling priority) |
|
||||
| `created_at` | Job creation timestamp |
|
||||
| `started_at` | Execution start timestamp |
|
||||
| `finished_at` | Execution end timestamp |
|
||||
@@ -280,6 +282,7 @@ Contains daemon-level events, not job output.
|
||||
manifest.json
|
||||
state → running
|
||||
stage → transcode
|
||||
load_level → HIGH
|
||||
pid → 12345
|
||||
heartbeat → 2026-01-21T18:42:10Z
|
||||
started_at → 2026-01-21T18:40:01Z
|
||||
|
||||
Reference in new issue
Block a user