Answer the question
In order to leave comments, you need to log in
Why does the recursive function reload the page?
Hello everyone, I continue to ask questions about yii), in general, there is a modal window in which I placed the form, there is also a button in the modal when I click on which I make a request to a third-party service, through queue, Systemd is running on the server, and if there is something it executes it right away, there are several requests, I made a request and I need to wait until the answer is received and update the form, but here's the problem, I update the form via pjax inside ActiveForm, ('data-pjax' => true and 'enctype' => 'multipart/form-data',) and in order to wait for a response, I use this construction
protected function CheckDoneQueue($id)
{
if(Yii::$app->queue->isDone($id)){
return true;
} else {
return $this->CheckDoneQueue($id);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question