olas-operate-middleware 0.13.0__py3-none-any.whl → 0.13.1__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.4
2
2
  Name: olas-operate-middleware
3
- Version: 0.13.0
3
+ Version: 0.13.1
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: David Vilela
@@ -80,7 +80,7 @@ operate/services/agent_runner.py,sha256=IQ9DAirYZAqWIk30CdU9mO0tVMymdj5LW5O3l8Uh
80
80
  operate/services/deployment_runner.py,sha256=bJr0u9yW8pku_46q9bUFFLnM9b9SKliDi0BzKr_gd3U,29336
81
81
  operate/services/funding_manager.py,sha256=S9jYnRQe2m6QDVrkvGS11KFYkbTPrZc0zNygahukHVs,38621
82
82
  operate/services/health_checker.py,sha256=r_lMlRZu-UNfqaM-Zo5_cWjsigdqYTAty4h-ISpM7RE,9859
83
- operate/services/manage.py,sha256=uifx-VJTPzqLj0N7qlHzTcjMrzqF2RH2PM0kIdieMfA,113270
83
+ operate/services/manage.py,sha256=EFZn_sUGn_WMvDecT6VW7yl-N-Q3nLooWXAaldipEfg,113703
84
84
  operate/services/protocol.py,sha256=DHu3TzaDuwTtidoEp7kGlbTAWw8pPbLjbyvanuyyjJs,72285
85
85
  operate/services/service.py,sha256=GqeS8Fm-iA8UPb4QdDWSHa5uZ-Or0G7po7qT0WfUJWI,45348
86
86
  operate/services/utils/__init__.py,sha256=TvioaZ1mfTRUSCtrQoLNAp4WMVXyqEJqFJM4PxSQCRU,24
@@ -94,8 +94,8 @@ operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
94
94
  operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
95
95
  operate/wallet/master.py,sha256=Wr6TsEqG3hQBDNeubGHZ2tZvaqFCfJ-nn8mTl7yQaXs,33698
96
96
  operate/wallet/wallet_recovery_manager.py,sha256=hG8qjWOqHuVaXn1puGQ3BpdUBMVx3LZtDzsPK-OeRqY,17515
97
- olas_operate_middleware-0.13.0.dist-info/METADATA,sha256=WpoR1HzlCM-7DQCghYHVElir0yGA7SDxxEocPrq-3Fc,2139
98
- olas_operate_middleware-0.13.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
99
- olas_operate_middleware-0.13.0.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
100
- olas_operate_middleware-0.13.0.dist-info/licenses/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
101
- olas_operate_middleware-0.13.0.dist-info/RECORD,,
97
+ olas_operate_middleware-0.13.1.dist-info/METADATA,sha256=z63DL8AN11C-qH7Xi7hmyH00NKJXnRyodjnJa_4WBw0,2139
98
+ olas_operate_middleware-0.13.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
99
+ olas_operate_middleware-0.13.1.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
100
+ olas_operate_middleware-0.13.1.dist-info/licenses/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
101
+ olas_operate_middleware-0.13.1.dist-info/RECORD,,
@@ -22,6 +22,7 @@
22
22
  import json
23
23
  import logging
24
24
  import os
25
+ import time
25
26
  import traceback
26
27
  import typing as t
27
28
  from collections import Counter, defaultdict
@@ -105,6 +106,8 @@ from operate.wallet.master import InsufficientFundsException, MasterWalletManage
105
106
  # If multiple agents are provided in the service.yaml file, only the 0th index config will be used.
106
107
  NUM_LOCAL_AGENT_INSTANCES = 1
107
108
 
109
+ RPC_SYNC_TIMEOUT = 15
110
+
108
111
 
109
112
  class ServiceManager:
110
113
  """Service manager."""
@@ -964,6 +967,10 @@ class ServiceManager:
964
967
  chain_data.token = event_data["args"]["serviceId"]
965
968
  service.store()
966
969
 
970
+ if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
971
+ time.sleep(RPC_SYNC_TIMEOUT)
972
+
973
+ # Activate service
967
974
  if (
968
975
  self._get_on_chain_state(service=service, chain=chain)
969
976
  == OnChainState.PRE_REGISTRATION
@@ -1028,6 +1035,10 @@ class ServiceManager:
1028
1035
  )
1029
1036
  ).settle()
1030
1037
 
1038
+ if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
1039
+ time.sleep(RPC_SYNC_TIMEOUT)
1040
+
1041
+ # Register agent instances
1031
1042
  if (
1032
1043
  self._get_on_chain_state(service=service, chain=chain)
1033
1044
  == OnChainState.ACTIVE_REGISTRATION
@@ -1094,6 +1105,9 @@ class ServiceManager:
1094
1105
  )
1095
1106
  ).settle()
1096
1107
 
1108
+ if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
1109
+ time.sleep(RPC_SYNC_TIMEOUT)
1110
+
1097
1111
  # Deploy service
1098
1112
  is_initial_funding = False
1099
1113
  if (