-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
domain: cadence-apiRelates to cadence APIRelates to cadence APIdomain: cadence-dbRelates to cadence databaseRelates to cadence databasetype: enhancement
Description
The Cadence container starts up faster than the Postgres container it depends on when launched through a Docker Compose stack normally. Since Cadence does a bunch of database configuration on initial connect, we end up without a working database.
We alleviate this currently with a hardcoded wait time before initial connect.
cadence/cadence/server/db_postgres.go
Lines 22 to 24 in baa6f2b
| // We wait a bit to give some leeway for Postgres to finish startup. | |
| // Obligatory: There's probably a better way to do this. | |
| time.Sleep(5 * time.Second) |
A more precise method (maybe timed auto-retry through Compose or in code) would be better.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
domain: cadence-apiRelates to cadence APIRelates to cadence APIdomain: cadence-dbRelates to cadence databaseRelates to cadence databasetype: enhancement