gilesknap / maaspower

Provide MAAS power control via webhooks for various remote control power switches.
Apache License 2.0
18 stars 13 forks source link

Webscrape parallel requests problem #8

Open gilesknap opened 2 years ago

gilesknap commented 2 years ago

My PoE switch cannot cope with MAAS interacting with two machines simultaneously. We are interacting with a single instance of the switch's Web GUI so this is not a surprise.

Possible Fixes -

gilesknap commented 2 years ago

in fact it can cope with parallel queries.

│device: GS308EP-pi6 command: query                                                                │
│device: GS308EP-pi7 command: query                                                                │
│device: GS308EP-pi5 command: query                                                                │
│response: status : stopped                                                                        │
│192.168.0.10 - - [19/Mar/2022 19:36:34] "GET /maaspower/GS308EP-pi6/query HTTP/1.1" 200 -         │
│response: status : running                                                                        │
│192.168.0.10 - - [19/Mar/2022 19:36:34] "GET /maaspower/GS308EP-pi7/query HTTP/1.1" 200 -         │
│response: status : running                                                                        │
│192.168.0.10 - - [19/Mar/2022 19:36:34] "GET /maaspower/GS308EP-pi5/query HTTP/1.1" 200 -         │
│       

But I cannot believe that a parallel off or on would work