Refactor runner and installation scripts for improved functionality
- Removed the `--disable-hiprt` flag from the runner command, simplifying the rendering options for users. - Updated the `jiggablend-runner` script and README to reflect the removal of the HIPRT control flag, enhancing clarity in usage instructions. - Enhanced the installation script to provide clearer examples for running the jiggablend manager and runner, improving user experience during setup. - Implemented a more robust GPU backend detection mechanism, allowing for better compatibility with various hardware configurations.
This commit is contained in:
@@ -21,8 +21,16 @@ const (
|
||||
KeyFixedAPIKey = "fixed_api_key"
|
||||
KeyRegistrationEnabled = "registration_enabled"
|
||||
KeyProductionMode = "production_mode"
|
||||
KeyAllowedOrigins = "allowed_origins"
|
||||
KeyAllowedOrigins = "allowed_origins"
|
||||
KeyFramesPerRenderTask = "frames_per_render_task"
|
||||
|
||||
// Operational limits (seconds / bytes / counts)
|
||||
KeyRenderTimeoutSecs = "render_timeout_seconds"
|
||||
KeyEncodeTimeoutSecs = "encode_timeout_seconds"
|
||||
KeyMaxUploadBytes = "max_upload_bytes"
|
||||
KeySessionCookieMaxAge = "session_cookie_max_age"
|
||||
KeyAPIRateLimit = "api_rate_limit"
|
||||
KeyAuthRateLimit = "auth_rate_limit"
|
||||
)
|
||||
|
||||
// Config manages application configuration stored in the database
|
||||
@@ -311,3 +319,34 @@ func (c *Config) GetFramesPerRenderTask() int {
|
||||
return n
|
||||
}
|
||||
|
||||
// RenderTimeoutSeconds returns the per-frame render timeout in seconds (default 3600 = 1 hour).
|
||||
func (c *Config) RenderTimeoutSeconds() int {
|
||||
return c.GetIntWithDefault(KeyRenderTimeoutSecs, 3600)
|
||||
}
|
||||
|
||||
// EncodeTimeoutSeconds returns the video encode timeout in seconds (default 86400 = 24 hours).
|
||||
func (c *Config) EncodeTimeoutSeconds() int {
|
||||
return c.GetIntWithDefault(KeyEncodeTimeoutSecs, 86400)
|
||||
}
|
||||
|
||||
// MaxUploadBytes returns the maximum upload size in bytes (default 50 GB).
|
||||
func (c *Config) MaxUploadBytes() int64 {
|
||||
v := c.GetIntWithDefault(KeyMaxUploadBytes, 50<<30)
|
||||
return int64(v)
|
||||
}
|
||||
|
||||
// SessionCookieMaxAgeSec returns the session cookie max-age in seconds (default 86400 = 24 hours).
|
||||
func (c *Config) SessionCookieMaxAgeSec() int {
|
||||
return c.GetIntWithDefault(KeySessionCookieMaxAge, 86400)
|
||||
}
|
||||
|
||||
// APIRateLimitPerMinute returns the API rate limit (requests per minute per IP, default 100).
|
||||
func (c *Config) APIRateLimitPerMinute() int {
|
||||
return c.GetIntWithDefault(KeyAPIRateLimit, 100)
|
||||
}
|
||||
|
||||
// AuthRateLimitPerMinute returns the auth rate limit (requests per minute per IP, default 10).
|
||||
func (c *Config) AuthRateLimitPerMinute() int {
|
||||
return c.GetIntWithDefault(KeyAuthRateLimit, 10)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user