Skip to content
Snippets Groups Projects
Commit 8703782d authored by Jiahang Chen's avatar Jiahang Chen
Browse files

Merge branch 'feature_reconstructe_thing' into 'master'

FIX: callback function change to async

See merge request !20
parents a57e0325 a4d2b209
No related branches found
No related tags found
1 merge request!20FIX: callback function change to async
Pipeline #582356 passed
......@@ -132,7 +132,7 @@ def _add_on_channel_open_callback(_thing, _callback, _one_shot, *_args, **_kwarg
)
def add_ml40_implementation(self, implementation_object, ml40_feature, *args, **kwargs):
def _add_ml40_implementation(_thing, _implementation_object, _ml40_feature, *_args, **_kwargs):
async def _add_ml40_implementation(_thing, _implementation_object, _ml40_feature, *_args, **_kwargs):
feature = _thing.entry.features.get(_ml40_feature, None)
if feature is None:
APP_LOGGER.critical(
......@@ -212,8 +212,9 @@ def __get_remaining_time_to_refresh(self):
def __setup_thing_json_sync(self):
APP_LOGGER.info("[S3I]: Start the thing")
self.__recursively_update_dt_json(frequency=self.parameters.thing_sync_freq)
self.callbacks.process(
prefix=self._ON_THING_START_OK
self.callbacks.process_async_task(
prefix=self._ON_THING_START_OK,
loop=self.loop
)
def __setup_directory(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment