Skip to content

Commit a7d0510

Browse files
committed
task: pass context to router condition evaluation
This patch passes context information to router condition evaluation during task processing. Signed-off-by: Eduardo Silva <[email protected]>
1 parent f176701 commit a7d0510

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/flb_task.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,15 @@ struct flb_task *flb_task_create(uint64_t ref_id,
440440

441441
o_ins = route_path->ins;
442442

443+
/* For conditional routing, also check the route mask */
444+
if (task_ic->routes_mask) {
445+
if (flb_routes_mask_get_bit(task_ic->routes_mask,
446+
o_ins->id,
447+
o_ins->config) == 0) {
448+
continue;
449+
}
450+
}
451+
443452
route = flb_calloc(1, sizeof(struct flb_task_route));
444453
if (!route) {
445454
flb_errno();

0 commit comments

Comments
 (0)