2026/08/31
< 2026
|
Monday, August 31, 2026 (#243)
|
|
References |
Main Work
I'm foolishly trying to improve some untidy stuff in the process-management parts of Ferreteria, because while I was fixing the DBA exporting readout I noticed it was opening a separate SSH connection for each schema.
I'm justifying this quixotic quest with the idea that the whole system is a little fragile -- because when I tried to change a process so it made more sense, it broke local exports but not ssh, which is something that also happened a few days ago when I made some changes to how Streams are handled.
Relevant pages:
- 2026/04/04 is where I worked out the last major revision to some of this stuff, though I don't think I ever documented it properly.
- added: actually, I did try to: process-management subsystem
- clades:
- important functions:
DoCommand(CommandIface &$oCmd): sets up the Command's Updater (if any); callsSendCommand()(but should it?)SendCommand(): calls$this->OExecRespond->PushBytes(<command>)StartProcess(): dependent on connection type:Localcallsproc_open(<command>, $arConf, $aPipes)SSH2callsssh2_exec($rConn,<command>)
NewSession(CommandIface &$oCmd)(inStarter): creates a newSessionobject and passes it theCommandobjectConnectify()(Remote (i.e. SSH2) only): connects (usingssh2_connect()andssh2_auth_agent(), eventually to be expanded to other auth methods)
In my head, it should work like this:
- create connection object
- open the connection
- for each schema:
- open a stream to receive responses
- send the command
- read the responses
- close the stream
- close the connection