AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers.
I'm writing a function that uses an ssh client (https://github.com/phpseclib/phpseclib/) to generate a package on a server, I'm using asyncTask because it's an rest api endpoint, the command I execute via phpseclib takes approximately 12 minutes in finish, so I set the timeout endlessly (phpseclib timeout), everythings working great but the asyncTask stops being asynchronous, the timeout breaks the task and the http petition takes forever.
Is there a way to make a ssh session asynchronous, is there some function of phpseclib breaking the pcntl functions that enables async tasks on php?
I'm writing a function that uses an ssh client (https://github.com/phpseclib/phpseclib/) to generate a package on a server, I'm using asyncTask because it's an rest api endpoint, the command I execute via phpseclib takes approximately 12 minutes in finish, so I set the timeout endlessly (phpseclib timeout), everythings working great but the asyncTask stops being asynchronous, the timeout breaks the task and the http petition takes forever.
Is there a way to make a ssh session asynchronous, is there some function of phpseclib breaking the pcntl functions that enables async tasks on php?
I hope you can help me. Thank you very much