Skip to content

Commit

Permalink
Merge pull request #1572 from samson0v/issues/iotgw-372
Browse files Browse the repository at this point in the history
Fixed returning response from restart RPC
  • Loading branch information
imbeacon authored Oct 29, 2024
2 parents 5c7dd8b + cde1234 commit e930483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thingsboard_gateway/gateway/tb_gateway_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,8 @@ def __rpc_gateway_processing(self, request_id, content):
method_function = self.__gateway_rpc_methods.get(method_to_call)

if method_function is None and method_to_call in self.__rpc_scheduled_methods_functions:
seconds_to_restart = arguments * 1000 if arguments and arguments != '{}' else 0
seconds_to_restart = arguments * 1000 if arguments and arguments != '{}' else 1000
seconds_to_restart = max(seconds_to_restart, 1000)
self.__scheduled_rpc_calls.append([time() * 1000 + seconds_to_restart,
self.__rpc_scheduled_methods_functions[method_to_call]])
log.info("Gateway %s scheduled in %i seconds", method_to_call, seconds_to_restart / 1000)
Expand Down

0 comments on commit e930483

Please sign in to comment.