diff --git a/pikatasks/__init__.py b/pikatasks/__init__.py index 675b278e96a61efea80f719e05dc60bc3b992374..10477abda1fcc29d1a2ed91df1b9606bd66a0fbc 100644 --- a/pikatasks/__init__.py +++ b/pikatasks/__init__.py @@ -112,7 +112,7 @@ def rpc(_task_name, **kwargs): expiration=str(int(settings.RPC_TIMEOUT.total_seconds() * 1000)), # in milliseconds, int as str; expire the message so this RPC will not get remotely executed like years later )) # ask to run the timeout function soon - conn.add_timeout(settings.RPC_TIMEOUT.total_seconds(), callback_timeout) + conn.call_later(settings.RPC_TIMEOUT.total_seconds(), callback_timeout) # consume, which will be stopped by either callback channel.start_consuming() channel.close() # after stopped consuming by either of the callbacks