feat: integrate creator hub douyin workflows

This commit is contained in:
2026-09-14 19:22:07 +08:00
parent 025fe62c37
commit 44a28954cf
42 changed files with 2850 additions and 880 deletions
+5 -5
View File
@@ -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))