Skip to content

Commit 47cbeca

Browse files
committed
remove obsolete config property
1 parent 38a171b commit 47cbeca

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

cmd/dbos/utils.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ func getDBURL(_ *cobra.Command) (string, error) {
7171
}
7272

7373
// createDBOSContext creates a new DBOS context with the provided database URL
74-
func createDBOSContext(userContext context.Context, dbURL string) (dbos.DBOSContext, error) {
74+
func createDBOSContext(ctx context.Context, dbURL string) (dbos.DBOSContext, error) {
7575
appName := "dbos-cli"
7676

7777
config := dbos.Config{
7878
DatabaseURL: dbURL,
7979
AppName: appName,
8080
Logger: initLogger(slog.LevelError),
81-
Context: userContext,
8281
}
8382

8483
// Use the global schema flag if it's set
@@ -87,11 +86,11 @@ func createDBOSContext(userContext context.Context, dbURL string) (dbos.DBOSCont
8786
logger.Debug("Using database schema", "schema", schema)
8887
}
8988

90-
ctx, err := dbos.NewDBOSContext(context.Background(), config)
89+
dbosCtx, err := dbos.NewDBOSContext(ctx, config)
9190
if err != nil {
9291
return nil, fmt.Errorf("failed to create DBOS context: %w", err)
9392
}
94-
return ctx, nil
93+
return dbosCtx, nil
9594
}
9695

9796
// outputJSON outputs data as JSON

dbos/dbos.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,17 @@ const (
3030
// Config holds configuration parameters for initializing a DBOS context.
3131
// DatabaseURL and AppName are required.
3232
type Config struct {
33-
DatabaseURL string // PostgreSQL connection string (required)
34-
AppName string // Application name for identification (required)
35-
DatabaseSchema string // Database schema name (defaults to "dbos")
36-
Logger *slog.Logger // Custom logger instance (defaults to a new slog logger)
37-
AdminServer bool // Enable Transact admin HTTP server (disabled by default)
38-
AdminServerPort int // Port for the admin HTTP server (default: 3001)
39-
ConductorURL string // DBOS conductor service URL (optional)
40-
ConductorAPIKey string // DBOS conductor API key (optional)
41-
ApplicationVersion string // Application version (optional, overridden by DBOS__APPVERSION env var)
42-
ExecutorID string // Executor ID (optional, overridden by DBOS__VMID env var)
43-
Context context.Context // User Context
44-
SystemDBPool *pgxpool.Pool // Custom System Database Pool
33+
DatabaseURL string // PostgreSQL connection string (required)
34+
AppName string // Application name for identification (required)
35+
DatabaseSchema string // Database schema name (defaults to "dbos")
36+
Logger *slog.Logger // Custom logger instance (defaults to a new slog logger)
37+
AdminServer bool // Enable Transact admin HTTP server (disabled by default)
38+
AdminServerPort int // Port for the admin HTTP server (default: 3001)
39+
ConductorURL string // DBOS conductor service URL (optional)
40+
ConductorAPIKey string // DBOS conductor API key (optional)
41+
ApplicationVersion string // Application version (optional, overridden by DBOS__APPVERSION env var)
42+
ExecutorID string // Executor ID (optional, overridden by DBOS__VMID env var)
43+
SystemDBPool *pgxpool.Pool // Custom System Database Pool. (optional, takes precedence over DatabaseURL)
4544
}
4645

4746
func processConfig(inputConfig *Config) (*Config, error) {

0 commit comments

Comments
 (0)