Merged in feature/doc_import (pull request #177)
integration of background processor * integration part 1 * feature working * fix mimetype issue
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"log/slog"
|
||||
"os"
|
||||
|
||||
"queryorchestration/internal/backgroundtask"
|
||||
"queryorchestration/internal/client"
|
||||
"queryorchestration/internal/cognitoauth"
|
||||
"queryorchestration/internal/collector"
|
||||
@@ -52,6 +53,7 @@ type QueryAPIConfig struct {
|
||||
clientsync.ClientSyncConfig
|
||||
queryversionsync.QueryVersionSyncConfig
|
||||
objectstore.ObjectStoreConfig
|
||||
BackgroundRunner *backgroundtask.Runner
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -138,13 +140,14 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
server, err := api.New(ctx, cfg)
|
||||
// Initialize S3 client before creating the server (needed for background worker)
|
||||
err := cfg.SetStoreClient(ctx)
|
||||
if err != nil {
|
||||
slog.Error(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
err = cfg.SetStoreClient(ctx)
|
||||
server, err := api.New(ctx, cfg)
|
||||
if err != nil {
|
||||
slog.Error(err.Error())
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user