@@ -124,6 +124,7 @@ def subscribe(
124
124
group : str ,
125
125
tenant : Optional [str ] = '' ,
126
126
timeout : Optional [int ] = 30_000 ,
127
+ serialized : Optional [bool ] = False ,
127
128
cache : Optional [BaseCache ] = None ,
128
129
callback : Optional [Callable ] = None
129
130
) -> SyncAsync [Any ]:
@@ -141,7 +142,7 @@ def _subscriber():
141
142
if not response :
142
143
continue
143
144
logging .info ("Configuration update detected." )
144
- last_config = self .get (data_id , group , tenant )
145
+ last_config = self .get (data_id , group , tenant , serialized = serialized )
145
146
last_md5 = _get_md5 (last_config )
146
147
cache .set (config_key , last_config )
147
148
if callback :
@@ -214,8 +215,9 @@ async def subscribe(
214
215
group : str ,
215
216
tenant : Optional [str ] = '' ,
216
217
timeout : Optional [int ] = 30_000 ,
218
+ serialized : Optional [bool ] = False ,
217
219
cache : Optional [BaseCache ] = None ,
218
- callback : Optional [Callable ] = None
220
+ callback : Optional [Callable ] = None ,
219
221
) -> SyncAsync [Any ]:
220
222
cache = cache or MemoryCache ()
221
223
config_key = _get_config_key (data_id , group , tenant )
@@ -233,7 +235,7 @@ async def _async_subscriber():
233
235
if not response :
234
236
continue
235
237
logging .info ("Configuration update detected." )
236
- last_config = await self .get (data_id , group , tenant )
238
+ last_config = await self .get (data_id , group , tenant , serialized = serialized )
237
239
last_md5 = _get_md5 (last_config )
238
240
cache .set (config_key , last_config )
239
241
if callback :
0 commit comments