Abp: DbMigrator never ends in a continuous deployment job

Created on 12 Apr 2020  路  4Comments  路  Source: abpframework/abp

When I ask my Azure DevOps release pipeline to run dotnet MyCompany.MyProject.DbMigrator.dll, the task never terminates, waiting indefinitely for a SIGTERM or Ctrl+C sequence to be sent.

I understand that this is the standard behavior of ConsoleLifetime but how can I run DbMigrator unattended?

abp-template-app enhancement

Most helpful comment

We can inject IHostApplicationLifetime into DbMigratorHostedServiceto manually request termination of the current application.

All 4 comments

Thank you for creating the issue, I also was thinking about that.

We can inject IHostApplicationLifetime into DbMigratorHostedServiceto manually request termination of the current application.

@Stirda Off-topic: Would you mind sharing your yml file for the release pipeline? I am trying to get mine to work but I am confused about deploying the DbMigrator. What steps do you take? Do you first deploy the DbMigrator, execute the dotnet .dll and then deploy the website?

@aklscv I suppose that the ABP team would prefer you create an issue for that. I will answer your question in.

Was this page helpful?
0 / 5 - 0 ratings