potiuk commented on a change in pull request #13356:
URL: https://github.com/apache/airflow/pull/13356#discussion_r550283152



##########
File path: airflow/providers/openfaas/hooks/openfaas.py
##########
@@ -68,16 +69,32 @@ def deploy_function(self, overwrite_function_if_exist: 
bool, body: Dict[str, Any
                 self.log.info("Function deployed %s", self.function_name)
 
     def invoke_async_function(self, body: Dict[str, Any]) -> None:
-        """Invoking function"""
+        """Invoking function asynchronously"""
         url = self.get_conn().host + self.INVOKE_ASYNC_FUNCTION + 
self.function_name
-        self.log.info("Invoking function %s", url)
+        self.log.info("Invoking function asynchronously %s", url)
         response = requests.post(url, body)

Review comment:
       Should we use `json=body` consistently ? Right now it looks like they 
might encode the data differently (`json=body` will be json-encoded and `body` 
will be form-encoded). Was this  deliberate distinction? 
https://docs.openfaas.com/reference/async/ does not seem to indicate there is 
any difference.  




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to