-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UmbracoApplicationStartedNotification is not published asynchronously during start #15509
Comments
Hi there @iliyan-kulishev! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
I am also having a hard time reproducing this on V13.5.2. Given this code: using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
namespace My.Site;
public class MyNotificationHandler :
INotificationAsyncHandler<UmbracoApplicationStartingNotification>,
INotificationAsyncHandler<UmbracoApplicationStartedNotification>
{
public Task HandleAsync(UmbracoApplicationStartingNotification notification, CancellationToken cancellationToken)
{
Console.WriteLine("#### APPLICATION STARTING ####");
return Task.CompletedTask;
}
public Task HandleAsync(UmbracoApplicationStartedNotification notification, CancellationToken cancellationToken)
{
Console.WriteLine("#### APPLICATION STARTED ####");
return Task.CompletedTask;
}
}
public class MyNotificationHandlerComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
=> builder
.AddNotificationAsyncHandler<UmbracoApplicationStartingNotification, MyNotificationHandler>()
.AddNotificationAsyncHandler<UmbracoApplicationStartedNotification, MyNotificationHandler>();
} The expected console logging happens: I'll go ahead and close this one 👍 |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
12.0.1
Bug summary
The notification is published async only during restart.
Specifics
Published async during restart:
![image](https://private-user-images.githubusercontent.com/22516081/292921877-700aa26f-5e40-4a25-9283-a2a89dbb0b54.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTI3MTMsIm5iZiI6MTczOTQxMjQxMywicGF0aCI6Ii8yMjUxNjA4MS8yOTI5MjE4NzctNzAwYWEyNmYtNWU0MC00YTI1LTkyODMtYTJhODlkYmIwYjU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDAyMDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc3NzExNmVhYjBlMzNhY2FiODMyNmMyMzM0MjY5NTBmNDFjYjE0MTY1NGE0ZDdjMDkzODlmNDgxYzMwZDM2ZjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UjR6g9wq_4T263LDfkfamn8a2g9DPb-Xd9e7mcQGBjE)
Published sync during start:
![image](https://private-user-images.githubusercontent.com/22516081/292921790-bcf50ecb-5464-4b46-9c67-67283d5dca40.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTI3MTMsIm5iZiI6MTczOTQxMjQxMywicGF0aCI6Ii8yMjUxNjA4MS8yOTI5MjE3OTAtYmNmNTBlY2ItNTQ2NC00YjQ2LTljNjctNjcyODNkNWRjYTQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDAyMDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0OTBiZWM5MTg5YzkwZjFjZmQzZWFlMzQ4ZTcwNmZlNDFiNTkwNzdlN2M0ZmY3MzU3NjIxNTgzZDRiMDJmNjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Z3ZUVnDfaNGwyEcQjUvJFKQn2XNSm_gNWRAAp4WjNYE)
Steps to reproduce
INotificationAsyncHandler<UmbracoApplicationStartedNotification>
Expected result / actual result
Execution never hits the breakpoint.
The text was updated successfully, but these errors were encountered: