Closed Yahasana closed 5 years ago
It's in Phalcon but similar, https://github.com/mruz/las/blob/master/app/cli/tasks/CronTask.php look at main action, it forwards to firewall action and firewall action to Firewall task. You can pass current data like the params or reset if needed.
what kind of cases need to run the handler action repeatly. and there is no way to set dispatcher->finished
in controller:: after
to make it rerun until reach to loops
times
Right, you can skip by returning false on before
or after
, but not brake.
How about if we move let this->finished = true,
to the end of while
loop and change to:
if this->finished === true {
return handler;
}
I'm not sure why this->finished === false
the dispatcher will start to re-run the action again. it look a little magic and ridiculous.
it seem that this feature works with forward
, which will interrupt current handler (in before, executed, after) and go to execute the forward one
it seem that
dispatcher::forward()
is not a well work feature. show a user case would be very helpful.