Skip to content

Commit

Permalink
Improve docstring for update_task_status
Browse files Browse the repository at this point in the history
  • Loading branch information
Eg0ra committed Dec 19, 2024
1 parent 5a23598 commit 51cef88
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion import_export_extensions/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,16 @@ def update_task_state(
):
"""Update state of the current event.
Receives meta of the current task and increase the `current`.
Receives meta of the current task and increase the `current`. Task
state is updated when current item is a multiple of
`self.status_update_row_count` or equal to total number of items.
For example: once every 1000 objects (if the current object is 1000,
2000, 3000) or when current object is the last object, in order to
complete the import/export.
This needed to increase the speed of import/export by reducing number
of status updates.
"""
if not current_task or current_task.request.called_directly:
Expand Down

0 comments on commit 51cef88

Please sign in to comment.