Skip to content

Commit

Permalink
engine: send backlog chunks on shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <[email protected]>
  • Loading branch information
PettitWesley authored and singholt committed Feb 17, 2025
1 parent c2b3d47 commit 76c983b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,8 @@ int flb_engine_start(struct flb_config *config)

ret = sb_segregate_chunks(config);

if (ret) {
if (ret < 0)
{
flb_error("[engine] could not segregate backlog chunks");
return -2;
}
Expand Down Expand Up @@ -1023,6 +1024,11 @@ int flb_engine_start(struct flb_config *config)
if (ret > 0 && (config->grace_count < config->grace || config->grace == -1)) {
if (config->grace_count == 1) {
flb_task_running_print(config);
ret = sb_segregate_chunks(config);
if (ret < 0) {
flb_error("[engine] could not segregate backlog chunks");
return -2;
}
}
flb_engine_exit(config);
}
Expand Down

0 comments on commit 76c983b

Please sign in to comment.