Does anyone know how to publish documents in a separate thread running in Umbraco? I think it may be failing as the publish process is trying to access httpcontext in this seperate thread??
// normally works, but fails when spawned in seperate thread // (required as a longer running process that need not hold up end user) umbraco.library.UpdateDocumentCache(id);
Publish documents in a separate thread
Does anyone know how to publish documents in a separate thread running in Umbraco? I think it may be failing as the publish process is trying to access httpcontext in this seperate thread??
Cheers,
Andy
Hi I think you're right, a new thread would not have access to the current HttpContext object.
I think webservices could be the way to go, maybe if you either call them async or get your new thread to call these:
http://our.umbraco.org/wiki/codegarden-2009/codegarden09-sessions/the-box/using-webservices-in-umbraco
is working on a reply...