Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
doruirimescu authored Jun 6, 2024
1 parent 02e08c5 commit ab2758b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ Usage
class MyDataProcessor(StatefulDataProcessor):
def process_item(self, item, delay):
# Process the item
def process_item(self, item, iteration_index: int, delay: float):
''' item and iteration_index are automatically supplied by the framework.
iteration_index may or may not be used.
'''
self.data[item] = item ** 2 # Example processing: square the item
time.sleep(delay)
Expand Down

0 comments on commit ab2758b

Please sign in to comment.