dmamontov / asynctask

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.
Other
57 stars 7 forks source link

Executing ssh session as async task #6

Open rafaelbecks opened 6 years ago

rafaelbecks commented 6 years ago

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

dmamontov commented 6 years ago

Very much I apologize. Late answer is likely. Soon there will be a new version. revised approach. If interested, I can help. Any screen demonstration.