I was just wondering if there is a subscriptions package for umbraco? e.g. where a member (not a user) will subscribe to a section of the site and get an email (or a digest) any time a new page is published.
Or alternatively, if anyone has implemented such a feature and would care to advise on how they did it (e.g. background processing/events), it'd be good to hear that. (On that subject - are events like Document.AfterPublish processed syncronously to the publish action, or does the "after" mean the publish has happened and the event code will be non-blocking?)
Both BeforePublish and AfterPublish are asynchronous delegate events, IIRC, which would mean that they're non-blocking.
To do a subscriptions package for Umbraco would be possible, however, to the best of my knowledge, no-one's made one yet. However, one of the core team runs a bunch of massive magazine sites so I suspect they may use some kind of subscription handling. I'll ask and get him to post up here if he has a response.
Benjamin, are you shure the are non blocking? You are able to cancel the Publish by setting the e.Cancel to true in the eventargs, so the publishing must be waiting for the events to finish before moving on? At least in version 4.0.3?
You could still write the changes as a task, and then set up a scheduled task to do the actual notification at a given interval. Umbraco has some built in task API, so you might be able to reuse that to mark as open/closed.
is there a subscriptions package
Hi,
I was just wondering if there is a subscriptions package for umbraco? e.g. where a member (not a user) will subscribe to a section of the site and get an email (or a digest) any time a new page is published.
Or alternatively, if anyone has implemented such a feature and would care to advise on how they did it (e.g. background processing/events), it'd be good to hear that. (On that subject - are events like Document.AfterPublish processed syncronously to the publish action, or does the "after" mean the publish has happened and the event code will be non-blocking?)
Thanks,
Chris
Hi Chris,
Both BeforePublish and AfterPublish are asynchronous delegate events, IIRC, which would mean that they're non-blocking.
To do a subscriptions package for Umbraco would be possible, however, to the best of my knowledge, no-one's made one yet. However, one of the core team runs a bunch of massive magazine sites so I suspect they may use some kind of subscription handling. I'll ask and get him to post up here if he has a response.
Best,
Benjamin :-)
Benjamin, are you shure the are non blocking? You are able to cancel the Publish by setting the e.Cancel to true in the eventargs, so the publishing must be waiting for the events to finish before moving on? At least in version 4.0.3?
I had a look at the source - looks like Morten is right - events are blocking.
@Benjamin, thanks for asking the core team member for me.
Cheers
Chris
Oh they are blocking alright.. I've had plenty of challenges with that recently ;-)
There is no subscriptions package Chris. But maybe you could take advantage of the translations / editor-publisher features?
You could still write the changes as a task, and then set up a scheduled task to do the actual notification at a given interval. Umbraco has some built in task API, so you might be able to reuse that to mark as open/closed.
is working on a reply...