AMOOOMA commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157247319
##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
return to_return
+ async def async_fn_process(self, element, *args, **kwargs):
+ """Makes the call to the wrapped dofn's start_bundle, process
+ and finish_bundle methods for asynchronous DoFns.
+
+ Args:
+ element: The element to process.
+ *args: Any additional arguments to pass to the wrapped dofn's process
+ method.
+ **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+ process method.
+
+ Returns:
+ A list of elements produced by the input element.
+ """
+ self._sync_fn.start_bundle()
+ process_result = self._sync_fn.process(element, *args, **kwargs)
+ bundle_result = self._sync_fn.finish_bundle()
+
+ if not process_result:
Review Comment:
Done.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]