Skip to content

finalize#

The finalize method is invoked when the maximum number of tasks per run has been reached. It is invoked only once. This is a good time for collecting metrics, closing handles, and performing cleanups.

Definition#

1
2
3
def finalize(
    self,
) -> None

Examples#

1
2
3
4
5
def finalize(
    self,
):
    self.apm_client.close()
    self.mongo.close()