Skip to content

Commit

Permalink
docstring for process_pids
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-pol committed Dec 19, 2023
1 parent fc0c3a2 commit ed4e982
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/datastation/common/batch_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ def __init__(self, wait=0.1, fail_on_first_error=True):
self.fail_on_first_error = fail_on_first_error

def process_pids(self, pids_or_objects, callback):
""" pids_or_objects are passed to the callback one by one.
""" The callback is called for each entry in pids_or_objects.
If an element of pids_or_objects is a string or a dictionary with key 'PID',
Args:
pids_or_objects: a list of pids or objects, or a single pid or object
callback: a function that takes a pid or object as argument
Returns:
None
If an entry of pids_or_objects is a string or a dictionary with key 'PID',
the value is used for progress logging.
"""
if type(pids_or_objects) is list:
Expand Down

0 comments on commit ed4e982

Please sign in to comment.