Skip to content

Commit

Permalink
add flush function
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewqian2001datadog committed Aug 12, 2024
1 parent aa74073 commit 13d9d39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion datadog/dogstatsd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,16 @@ def pre_fork(self):

def post_fork_parent(self):
"""Restore the client state after a fork in the parent process."""
self._start_flush_thread(self._flush_interval)
if self._disable_aggregating:
self._start_flush_thread(
self._flush_interval,
self.flush_buffered_metrics,
)
else:
self._start_flush_thread(
self._flush_interval,
self.flush_aggregated_metrics,
)
self._start_sender_thread()
self._config_lock.release()

Expand Down

0 comments on commit 13d9d39

Please sign in to comment.