olas-operate-middleware 0.10.12__py3-none-any.whl → 0.10.13__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: olas-operate-middleware
3
- Version: 0.10.12
3
+ Version: 0.10.13
4
4
  Summary:
5
5
  Author: David Vilela
6
6
  Author-email: dvilelaf@gmail.com
@@ -6,7 +6,7 @@ operate/bridge/providers/lifi_provider.py,sha256=FpAlBAA_gOt-oOHKhGaOQhhTZIL-hgY
6
6
  operate/bridge/providers/native_bridge_provider.py,sha256=gG8bSyxUoAVEF6_J9tn1qKRv1PnXuMJdMwUAVJ4GJz8,24647
7
7
  operate/bridge/providers/provider.py,sha256=i54RL7m4wMSADM_D_V_quQump_ipPTmByUc-c-AOLPQ,19687
8
8
  operate/bridge/providers/relay_provider.py,sha256=L7D-PKepsuBadarJmrNneZk0bsrh88u05uD6_2MSss4,17341
9
- operate/cli.py,sha256=REHgtFvaSs7jm7B0K1tPkEKco7Bmd06KQvYAQstFPyw,55783
9
+ operate/cli.py,sha256=J5k9RGX-VH2aLMJ6N8iut2hSlwTdKF2VJksLHkKZ-SA,56012
10
10
  operate/constants.py,sha256=p_kYu4YyMnoZKHVrhhSjJlCCjWxRdSIzWfvQQeO8Ud4,3030
11
11
  operate/data/README.md,sha256=jGPyZTvg2LCGdllvmYxmFMkkkiXb6YWatbqIkcX3kv4,879
12
12
  operate/data/__init__.py,sha256=ttC51Yqk9c4ehpIgs1Qbe7aJvzkrbbdZ1ClaCxJYByE,864
@@ -79,7 +79,7 @@ operate/services/__init__.py,sha256=isrThS-Ccu5Sc15JZgkN4uTAVaSg-NwUUSDeTyJEqLk,
79
79
  operate/services/agent_runner.py,sha256=6tJePUJmlRxlIugT2fDaCJHSrQlDnl1t9pbg3-7EmCQ,7560
80
80
  operate/services/deployment_runner.py,sha256=Su73o7cdH6fkQfj468K77J04a_TWiokJwbMyVQ25xko,27067
81
81
  operate/services/health_checker.py,sha256=MuGZ0pQ7zyJVbNU9FJR5gR8zTE7z7kCH1h5Ampv9IC0,9837
82
- operate/services/manage.py,sha256=5yUZPOFZYHVBV8KSZfGQf9JGsoTFZgfaCUsYbQdPlSw,118137
82
+ operate/services/manage.py,sha256=XzT9y29x_3kaHEwziIP6uDoKxtsmufwSiwdQP3bJUy8,118147
83
83
  operate/services/protocol.py,sha256=FoJmHz5nukI01-VYtReMsIl3JT5RgZZSLX-mf9EXQ90,62903
84
84
  operate/services/service.py,sha256=1gjBu3yzwFKX54xEeyRZ_NzRjuYk_gpfWzS8JWTQ2xs,39319
85
85
  operate/services/utils/__init__.py,sha256=TvioaZ1mfTRUSCtrQoLNAp4WMVXyqEJqFJM4PxSQCRU,24
@@ -91,8 +91,8 @@ operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
91
91
  operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
92
92
  operate/wallet/master.py,sha256=jLFLcRgO6ADok2DigpK59PFJ4mnc_0H9a4RRioYzlvw,30811
93
93
  operate/wallet/wallet_recovery_manager.py,sha256=sXEZyvFMePxQKf9NJg4HT90mPg4-7ZcTbvggMnKKzhA,7795
94
- olas_operate_middleware-0.10.12.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
95
- olas_operate_middleware-0.10.12.dist-info/METADATA,sha256=hckT7Sd5e7xDjE38VbjWsuB068kkU1o5qDF7NzZSn6s,2036
96
- olas_operate_middleware-0.10.12.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
97
- olas_operate_middleware-0.10.12.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
98
- olas_operate_middleware-0.10.12.dist-info/RECORD,,
94
+ olas_operate_middleware-0.10.13.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
95
+ olas_operate_middleware-0.10.13.dist-info/METADATA,sha256=EmIBE2jBrbkVwIrf9EzjUuq4gIDw3htcxDRU-AISWLY,2036
96
+ olas_operate_middleware-0.10.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
97
+ olas_operate_middleware-0.10.13.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
98
+ olas_operate_middleware-0.10.13.dist-info/RECORD,,
operate/cli.py CHANGED
@@ -1325,6 +1325,7 @@ def _daemon(
1325
1325
  {
1326
1326
  "ssl_keyfile": ssl_keyfile,
1327
1327
  "ssl_certfile": ssl_certfile,
1328
+ "ssl_version": 2,
1328
1329
  }
1329
1330
  )
1330
1331
 
@@ -1333,10 +1334,15 @@ def _daemon(
1333
1334
  url = f"http{'s' if ssl_keyfile and ssl_certfile else ''}://{host}:{port}/shutdown"
1334
1335
  logger.info(f"trying to stop previous instance with {url}")
1335
1336
  try:
1336
- requests.get(url, timeout=3, verify=False) # nosec
1337
- logger.info("previous instance stopped")
1338
- except Exception: # pylint: disable=broad-except
1339
- logger.exception("failed to stop previous instance. probably not running")
1337
+ requests.get(
1338
+ f"https://{host}:{port}/shutdown", timeout=3, verify=False # nosec
1339
+ )
1340
+ except requests.exceptions.SSLError:
1341
+ logger.warning("SSL failed, trying HTTP fallback...")
1342
+ try:
1343
+ requests.get(f"http://{host}:{port}/shutdown", timeout=3)
1344
+ except Exception: # pylint: disable=broad-except
1345
+ logger.exception("Failed to stop previous instance")
1340
1346
 
1341
1347
  server = Server(Config(**config_kwargs))
1342
1348
  app._server = server # pylint: disable=protected-access
@@ -1267,7 +1267,7 @@ class ServiceManager:
1267
1267
  chain=chain,
1268
1268
  staking_program_id=current_staking_program,
1269
1269
  )
1270
- else:
1270
+ elif is_staked:
1271
1271
  # at least claim the rewards if we cannot unstake yet
1272
1272
  self.claim_on_chain_from_safe(
1273
1273
  service_config_id=service_config_id,