Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 9m20s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 55m7s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package constant
|
|
|
|
type TaskPlatform string
|
|
|
|
const (
|
|
TaskPlatformSuno TaskPlatform = "suno"
|
|
TaskPlatformMidjourney = "mj"
|
|
)
|
|
|
|
const (
|
|
TaskActionImageToVideo = "image_to_video"
|
|
TaskActionTextToVideo = "text_to_video"
|
|
TaskActionFirstTailToVideo = "first_tail_to_video"
|
|
TaskActionReferenceToVideo = "reference_to_video"
|
|
TaskActionRemix = "remix"
|
|
)
|
|
|
|
var legacyTaskActionAliases = map[string]string{
|
|
"generate": TaskActionImageToVideo,
|
|
"textGenerate": TaskActionTextToVideo,
|
|
"firstTailGenerate": TaskActionFirstTailToVideo,
|
|
"referenceGenerate": TaskActionReferenceToVideo,
|
|
"remixGenerate": TaskActionRemix,
|
|
}
|
|
|
|
// TaskPluginEnabled is the master switch for the whole task-plugin system.
|
|
// When disabled, factory and override plugins both stop serving.
|
|
var TaskPluginEnabled = true
|
|
|
|
// NormalizeTaskAction maps persisted legacy action names to the canonical task
|
|
// action vocabulary. Unknown platform-specific actions pass through unchanged.
|
|
func NormalizeTaskAction(action string) string {
|
|
if canonical, ok := legacyTaskActionAliases[action]; ok {
|
|
return canonical
|
|
}
|
|
return action
|
|
}
|