feat: integrate creator hub douyin workflows
This commit is contained in:
@@ -96,11 +96,11 @@ func newCommand() *cobra.Command {
|
||||
creatorScheduleDone := make(chan struct{})
|
||||
go func() {
|
||||
defer close(creatorScheduleDone)
|
||||
runCreatorScheduler(creatorScheduleContext, creatorStore, phaseAStore, hubStore, credentials)
|
||||
runCreatorScheduler(creatorScheduleContext, creatorStore, phaseAStore, hubStore)
|
||||
}()
|
||||
creatorEventContext, stopCreatorEvents := context.WithCancel(command.Context())
|
||||
creatorEventDone := make(chan struct{})
|
||||
creatorEventExecutor := creatorGatewayActionExecutor{store: creatorStore, phaseAStore: phaseAStore, hubStore: hubStore, credentials: credentials}
|
||||
creatorEventExecutor := creatorGatewayActionExecutor{store: creatorStore, phaseAStore: phaseAStore, hubStore: hubStore}
|
||||
creatorAI := &creator.ConfiguredBailian{Store: creatorStore, APIKey: cfg.aiAPIKey, BaseURL: cfg.aiBaseURL}
|
||||
go func() {
|
||||
defer close(creatorEventDone)
|
||||
@@ -295,13 +295,13 @@ func newHandlerWithCreatorAndAI(webDirectory, username, password string, phaseAS
|
||||
}
|
||||
if creatorStore != nil {
|
||||
if generator == nil && analyzer == nil {
|
||||
registerCreator(app, creatorStore, phaseAStore, hubStore, credentials)
|
||||
registerCreator(app, creatorStore, phaseAStore, hubStore)
|
||||
} else {
|
||||
var executor creator.ActionExecutor
|
||||
if phaseAStore != nil && hubStore != nil {
|
||||
executor = creatorGatewayActionExecutor{store: creatorStore, phaseAStore: phaseAStore, hubStore: hubStore, credentials: credentials}
|
||||
executor = creatorGatewayActionExecutor{store: creatorStore, phaseAStore: phaseAStore, hubStore: hubStore}
|
||||
}
|
||||
registerCreatorWithServices(app, creatorStore, phaseAStore, hubStore, credentials, executor, generator, analyzer)
|
||||
registerCreatorWithServices(app, creatorStore, phaseAStore, hubStore, executor, generator, analyzer)
|
||||
}
|
||||
}
|
||||
app.Get("/*", spaHandler(webDirectory))
|
||||
|
||||
Reference in New Issue
Block a user