Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • andles 44 posts 64 karma points
    Oct 27, 2011 @ 07:31
    andles
    0

    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??

    // 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);

    Cheers,
    Andy

     

     

  • Thomas 49 posts 78 karma points c-trib
    Oct 29, 2011 @ 14:55
    Thomas
    0

    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

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies