Currently, the DB schema and tables are attempted created on service start. However, there's no retries on this process. For example, when running a service using .NET Aspire, the service always fails to initialize the schema/tables and establish a connection to the DB because the database isn't quite ready yet. The logs just say something about the connection being successful, but failing on pre-handshake. If I, in the Program.cs file add a 10-second delay before configuring the IServiceCollection, the service is able to create the schema/tables and establish the connection just fine. It would be nice not to have such a delay on startup of the service, and instead have Hangfire initialization at least try a few times if a connection can't immediately be established.
Currently, the DB schema and tables are attempted created on service start. However, there's no retries on this process. For example, when running a service using .NET Aspire, the service always fails to initialize the schema/tables and establish a connection to the DB because the database isn't quite ready yet. The logs just say something about the connection being successful, but failing on pre-handshake. If I, in the Program.cs file add a 10-second delay before configuring the IServiceCollection, the service is able to create the schema/tables and establish the connection just fine. It would be nice not to have such a delay on startup of the service, and instead have Hangfire initialization at least try a few times if a connection can't immediately be established.
.NET 8 Hangfire 1.8.14 Aspire 8.2.0 MacOS 14.6.1