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:
2026-03-14 21:08:06 -05:00
parent 28cb50492c
commit 16d6a95058
30 changed files with 1041 additions and 782 deletions

View File

@@ -345,9 +345,9 @@ func (s *Manager) handleCreateJob(w http.ResponseWriter, r *http.Request) {
// Only create render tasks for render jobs
if req.JobType == types.JobTypeRender {
// Determine task timeout based on output format
taskTimeout := RenderTimeout // 1 hour for render jobs
taskTimeout := s.renderTimeout
if *req.OutputFormat == "EXR_264_MP4" || *req.OutputFormat == "EXR_AV1_MP4" || *req.OutputFormat == "EXR_VP9_WEBM" {
taskTimeout = VideoEncodeTimeout // 24 hours for encoding
taskTimeout = s.videoEncodeTimeout
}
// Create tasks for the job (batch INSERT in a single transaction)
@@ -390,7 +390,7 @@ func (s *Manager) handleCreateJob(w http.ResponseWriter, r *http.Request) {
// Create encode task immediately if output format requires it
// The task will have a condition that prevents it from being assigned until all render tasks are completed
if *req.OutputFormat == "EXR_264_MP4" || *req.OutputFormat == "EXR_AV1_MP4" || *req.OutputFormat == "EXR_VP9_WEBM" {
encodeTaskTimeout := VideoEncodeTimeout // 24 hours for encoding
encodeTaskTimeout := s.videoEncodeTimeout
conditionJSON := `{"type": "all_render_tasks_completed"}`
var encodeTaskID int64
err = s.db.With(func(conn *sql.DB) error {
@@ -2592,7 +2592,7 @@ func (s *Manager) handleDownloadJobFile(w http.ResponseWriter, r *http.Request)
}
// Set headers
w.Header().Set("Content-Disposition", fmt.Sprintf("%s; filename=%s", disposition, fileName))
w.Header().Set("Content-Disposition", fmt.Sprintf("%s; filename=%q", disposition, fileName))
w.Header().Set("Content-Type", contentType)
// Stream file
@@ -2710,7 +2710,7 @@ func (s *Manager) handleDownloadEXRZip(w http.ResponseWriter, r *http.Request) {
fileName := fmt.Sprintf("%s-exr.zip", safeJobName)
w.Header().Set("Content-Type", "application/zip")
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s", fileName))
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%q", fileName))
zipWriter := zip.NewWriter(w)
defer zipWriter.Close()
@@ -2881,7 +2881,7 @@ func (s *Manager) handlePreviewEXR(w http.ResponseWriter, r *http.Request) {
// Set headers
pngFileName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) + ".png"
w.Header().Set("Content-Disposition", fmt.Sprintf("inline; filename=%s", pngFileName))
w.Header().Set("Content-Disposition", fmt.Sprintf("inline; filename=%q", pngFileName))
w.Header().Set("Content-Type", "image/png")
w.Header().Set("Content-Length", strconv.Itoa(len(pngData)))