Skip to content

Commit 52f9920

Browse files
authored
Process log batches on terminate
1 parent 00acfb5 commit 52f9920

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

reportportal_client/service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ def __init__(self,
209209

210210
def terminate(self, *args, **kwargs):
211211
"""Call this to terminate the service."""
212-
pass
212+
if self._batch_logs:
213+
self._log_batch(None, force=True)
213214

214215
def start_launch(self,
215216
name,
@@ -244,7 +245,8 @@ def finish_launch(self, end_time, status=None, attributes=None, **kwargs):
244245
Status can be one of the followings:
245246
(PASSED, FAILED, STOPPED, SKIPPED, RESETED, CANCELLED)
246247
"""
247-
# process log batches firstly:
248+
# process log batches firstly. Remove this step when all the agents
249+
# start using terminate() method.
248250
if self._batch_logs:
249251
self._log_batch(None, force=True)
250252
if attributes and isinstance(attributes, dict):

0 commit comments

Comments
 (0)