XF 2.0 Does XF2 have a progress-bar style post method?

Jaxel

Well-known member
I've got a function I want to run. It could take 3 minutes to run the process. Does XF2 have a build-in way to run the process, and keep-alive so that the server doesn't exhaust after 30 seconds... and display the progress to the end user?

Or do I have to write my own function like I did in XF1?
 
With 0 details, this sounds like something that should be run with the Job system. The Job system is processed in the background though, so no progress bars.


Fillip
 
Its not a function that is run on a timer... it runs when someone clicks a button.
 
I was hoping there was an easy way to set this all up... like the cache rebuilder... except I need it ran from the front-end, not the admin cp.
 
Last edited:
Jobs in the job system don't have to be run on a timer (that's actually a separate system, the cron system, which can enqueue jobs but doesn't necessarily have to). You can trigger them from anywhere, including on the front-end.

Have a look at the job manager (\XF::app()->jobManager()), particularly the enqueue() methods.
 
Ended up just writing my own function like I did in XF1... just simpler and easier.
 
Back
Top Bottom