๐Ÿ“ฆ PedramNavid / petit

๐Ÿ“„ config.toml ยท 92 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92# Petit Configuration File Example
#
# This file demonstrates all available configuration options for the Petit task orchestrator.
# By default, Petit looks for this file at ~/.config/petit/config.toml
# You can also specify a custom config path using: pt --config /path/to/config.toml
#
# Command-line arguments always take precedence over configuration file settings.

# Storage Configuration
# Defines how Petit stores job runs, task states, and execution history.
[storage]
# Storage engine: "memory" or "sqlite"
# - memory: Fast, but data is lost when the application stops
# - sqlite: Persistent storage to a database file (requires sqlite feature)
engine = "memory"

# For SQLite storage, specify the database file path:
# engine = "sqlite"
# path = "/var/lib/petit/petit.db"

# API Server Configuration (requires api feature, enabled by default)
[api]
# Enable or disable the HTTP REST API server
enabled = true

# Host address to bind the API server
host = "127.0.0.1"

# Port number for the API server
port = 8565

# Scheduler Configuration
[scheduler]
# Maximum number of concurrent jobs (default: unlimited)
# Uncomment to limit concurrent job execution:
# max_jobs = 10

# Maximum number of concurrent tasks per job (default: 4)
max_tasks = 4

# Scheduler tick interval in seconds (default: 1)
# How often the scheduler checks for jobs that need to run
tick_interval = 1

# Example configurations for different use cases:

# === Development Configuration ===
# Use in-memory storage for quick testing without persistence
# [storage]
# engine = "memory"
#
# [api]
# enabled = true
# host = "127.0.0.1"
# port = 8565
#
# [scheduler]
# max_tasks = 2
# tick_interval = 1

# === Production Configuration ===
# Use SQLite for persistent storage and reasonable concurrency limits
# [storage]
# engine = "sqlite"
# path = "/var/lib/petit/petit.db"
#
# [api]
# enabled = true
# host = "0.0.0.0"
# port = 8565
#
# [scheduler]
# max_jobs = 50
# max_tasks = 8
# tick_interval = 1

# === High-Throughput Configuration ===
# Maximize concurrency for high-volume task processing
# [storage]
# engine = "sqlite"
# path = "/var/lib/petit/petit.db"
#
# [api]
# enabled = true
# host = "0.0.0.0"
# port = 8565
#
# [scheduler]
# max_jobs = 100
# max_tasks = 16
# tick_interval = 1