Implement orch core scheduling
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package orch
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"ai-workflow-skill/internal/db"
|
||||
)
|
||||
|
||||
func openOrchDB(ctx context.Context, dbPath string) (*sql.DB, error) {
|
||||
sqlDB, err := db.Open(ctx, dbPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := db.ApplyMigrations(ctx, sqlDB); err != nil {
|
||||
_ = sqlDB.Close()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return sqlDB, nil
|
||||
}
|
||||
Reference in New Issue
Block a user