Documentation ¶
Index ¶
- func CreateUpscaleInternal(AsynqClient *asynq.Client, S3 *s3.S3, Track *analytics.AnalyticsService, ...) error
- func ShouldUseRunpodGenerate(model *ent.GenerationModel, redis *database.RedisWrapper) bool
- func ShouldUseRunpodUpscale(model *ent.UpscaleModel, redis *database.RedisWrapper) bool
- type SCWorker
- func (w *SCWorker) CreateGeneration(source enttypes.SourceType, r *http.Request, user *ent.User, ...) (*responses.ApiSucceededResponse, *responses.ImageGenerationSettingsResponse, ...)
- func (w *SCWorker) CreateUpscale(source enttypes.SourceType, r *http.Request, user *ent.User, ...) (*responses.ApiSucceededResponse, *responses.ImageUpscaleSettingsResponse, ...)
- func (w *SCWorker) CreateVoiceover(source enttypes.SourceType, r *http.Request, user *ent.User, ...) (*responses.ApiSucceededResponse, *responses.VoiceoverSettingsResponse, ...)
- type WorkerError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUpscaleInternal ¶
func CreateUpscaleInternal(AsynqClient *asynq.Client, S3 *s3.S3, Track *analytics.AnalyticsService, Repo *repository.Repository, Redis *database.RedisWrapper, MQClient queue.MQClient, sMap *shared.SyncMap[chan requests.CogWebhookMessage], generation *ent.Generation, output *ent.GenerationOutput) error
Create an Upscale in sc-worker, wait for result ! TODO - clean this up and merge with CreateUpscale method
func ShouldUseRunpodGenerate ¶
func ShouldUseRunpodGenerate(model *ent.GenerationModel, redis *database.RedisWrapper) bool
func ShouldUseRunpodUpscale ¶
func ShouldUseRunpodUpscale(model *ent.UpscaleModel, redis *database.RedisWrapper) bool
Types ¶
type SCWorker ¶
type SCWorker struct { Repo *repository.Repository Redis *database.RedisWrapper SMap *shared.SyncMap[chan requests.CogWebhookMessage] QueueThrottler *shared.UserQueueThrottlerMap Track *analytics.AnalyticsService SafetyChecker *translator.TranslatorSafetyChecker S3Img *s3.S3 S3 *s3.S3 MQClient queue.MQClient AsynqClient *asynq.Client }
func (*SCWorker) CreateGeneration ¶
func (w *SCWorker) CreateGeneration(source enttypes.SourceType, r *http.Request, user *ent.User, apiTokenId *uuid.UUID, clipSvc *clip.ClipService, generateReq requests.CreateGenerationRequest) (*responses.ApiSucceededResponse, *responses.ImageGenerationSettingsResponse, *WorkerError)
func (*SCWorker) CreateUpscale ¶
func (w *SCWorker) CreateUpscale(source enttypes.SourceType, r *http.Request, user *ent.User, apiTokenId *uuid.UUID, upscaleReq requests.CreateUpscaleRequest) (*responses.ApiSucceededResponse, *responses.ImageUpscaleSettingsResponse, *WorkerError)
func (*SCWorker) CreateVoiceover ¶
func (w *SCWorker) CreateVoiceover(source enttypes.SourceType, r *http.Request, user *ent.User, apiTokenId *uuid.UUID, voiceoverReq requests.CreateVoiceoverRequest) (*responses.ApiSucceededResponse, *responses.VoiceoverSettingsResponse, *WorkerError)
type WorkerError ¶
Error wrapper for GPU worker requests
func WorkerInternalServerError ¶
func WorkerInternalServerError() *WorkerError
Suppresses internal errors
func (*WorkerError) Error ¶
func (r *WorkerError) Error() string
Click to show internal directories.
Click to hide internal directories.