Worker: add TIFF decoding support
This commit is contained in:
parent
610cab0961
commit
a95e8781cf
@ -13,6 +13,7 @@ bugs in actually-released versions.
|
||||
This just means that the Manager has to tell the Worker which Blender to use,
|
||||
which is perfectly fine.
|
||||
- Fix error in sleep scheduler when shutting down the Manager.
|
||||
- Workers can now decode TIFF files to generate previews.
|
||||
|
||||
|
||||
## 3.0 - released 2022-09-12
|
||||
|
BIN
internal/worker/command_ffmpeg_test_files/frame-1.tiff
Normal file
BIN
internal/worker/command_ffmpeg_test_files/frame-1.tiff
Normal file
Binary file not shown.
@ -14,6 +14,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
_ "golang.org/x/image/tiff"
|
||||
|
||||
"git.blender.org/flamenco/pkg/last_in_one_out_queue"
|
||||
)
|
||||
|
@ -93,6 +93,34 @@ func TestProcess(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestProcessTiff(t *testing.T) {
|
||||
ou, mocks, finish := mockedOutputUploader(t)
|
||||
defer finish()
|
||||
|
||||
taskID := "094d98ba-d6e2-4765-a10b-70533604a952"
|
||||
filename := "command_ffmpeg_test_files/frame-1.tiff"
|
||||
|
||||
item := TaskOutput{
|
||||
TaskID: taskID,
|
||||
Filename: filename,
|
||||
}
|
||||
|
||||
{
|
||||
// Test happy response from Manager.
|
||||
response := api.TaskOutputProducedResponse{
|
||||
HTTPResponse: &http.Response{
|
||||
Status: "202 Accepted",
|
||||
StatusCode: http.StatusAccepted,
|
||||
},
|
||||
}
|
||||
mocks.client.EXPECT().TaskOutputProducedWithBodyWithResponse(
|
||||
mocks.ctx, taskID, "image/jpeg", gomock.Any()).
|
||||
Return(&response, nil)
|
||||
|
||||
ou.process(mocks.ctx, item)
|
||||
}
|
||||
}
|
||||
|
||||
type outputUploaderTestMocks struct {
|
||||
client *mocks.MockFlamencoClient
|
||||
ctx context.Context
|
||||
|
Loading…
x
Reference in New Issue
Block a user