1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to start another manual deferred process from within the current deferred process.

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, Aug 23, 2015.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I am rebuilding the permalinks via deferred process and once that is done, I need to rebuild the blocks. I added something like:
    PHP:
    XenForo_Application::defer(
        
    'Atomic', array('simple' => 'GFNPermalink_Deferred_BlockRebuild'), 'permalinkBlock'true
    );
    which gets called once the permalink rebuild finishes it's job but it's not getting called for some reason and after some time the notice for continuing the manual deferred process on the admin home.

    Any help is highly appreciated :)
     
  2. Mike

    Mike XenForo Developer Staff Member

    You can't really do what you're doing directly. I would also note that using the Atomic helper isn't really useful when you're only running one process. The purpose is to run 2 or more processes atomically (ensure the first completes before the second starts). So it sounds to me like you want to trigger both processes together at the start using Atomic. (Or you need to write an specific version of Atomic to trigger the second process internally.)
     
  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I see... so I guess I should just add the class in the original call for the permalink rebuilder to keep matters simple. :D
     

Share This Page