Skip to content
Snippets Groups Projects

FIX: callback function change to async

Merged Jiahang Chen requested to merge feature_reconstructe_thing into master
1 file
+ 4
3
Compare changes
  • Side-by-side
  • Inline
+ 4
3
@@ -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):
Loading