prim-ctrl 0.7.10__tar.gz → 0.7.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/PKG-INFO +1 -1
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/prim_ctrl/__main__.py +8 -1
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/pyproject.toml +1 -1
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/LICENSE +0 -0
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/README.md +0 -0
- {prim_ctrl-0.7.10 → prim_ctrl-0.7.12}/prim_ctrl/__init__.py +0 -0
|
@@ -845,6 +845,10 @@ class WebhookPing(Pingable):
|
|
|
845
845
|
self.ping_url = f'{self.funnel.external_url}{Webhooks.get_ping_path()}'
|
|
846
846
|
self.__qualname__ = "Webhooks"
|
|
847
847
|
|
|
848
|
+
async def wait_for(self, available: bool, timeout: float):
|
|
849
|
+
self._sleepcounter = 0
|
|
850
|
+
await super().wait_for(available, timeout)
|
|
851
|
+
|
|
848
852
|
async def ping(self, availability_hint: bool | None = None):
|
|
849
853
|
logger.debug("Calling url %s", self.ping_url)
|
|
850
854
|
try:
|
|
@@ -854,7 +858,10 @@ class WebhookPing(Pingable):
|
|
|
854
858
|
return False
|
|
855
859
|
|
|
856
860
|
async def _sleep_while_wait(self, available: bool):
|
|
861
|
+
if 0 != self._sleepcounter and 0 == self._sleepcounter % 60:
|
|
862
|
+
logger.info("Waiting for %s (%s) to be accessible...", LazyStr(self.get_class_name), self.ping_url)
|
|
857
863
|
await asyncio.sleep(1)
|
|
864
|
+
self._sleepcounter += 1
|
|
858
865
|
|
|
859
866
|
class AutomatePhoneState(PhoneState):
|
|
860
867
|
VARIABLE_STATE = 'state'
|
|
@@ -888,7 +895,7 @@ class AutomatePhoneState(PhoneState):
|
|
|
888
895
|
|
|
889
896
|
# test external funnel + webhooks availability, ie. test funnel tcp forwarders
|
|
890
897
|
# it will NOT be routed locally, so the route is equivalent with / similar to what Automate will see
|
|
891
|
-
test_timeout =
|
|
898
|
+
test_timeout = 300.0
|
|
892
899
|
logger.debug("Testing Funnel with calling external webhook (timeout is %ds)", int(test_timeout))
|
|
893
900
|
try:
|
|
894
901
|
await self.external_webhook_ping.wait_for(True, test_timeout)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "prim-ctrl"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.12"
|
|
4
4
|
description = "Primitive Ctrl - Remote control of your phone's Primitive FTPd Android SFTP server and optionally Tailscale VPN."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
authors = ["Laszlo Magyar <lmagyar1973@gmail.com>"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|