Skip to content

Commit a5a9f24

Browse files
committed
Preserve built-in event handler order
1 parent 928c4db commit a5a9f24

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/events/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<H: ?Sized + Send + Sync + 'static> EventHandlerChain<H> {
5050
.get_extension::<Self>()
5151
.map(|v| v.as_ref().clone())
5252
.unwrap_or_default();
53-
for handler in handler_list.into_iter().rev() {
53+
for handler in handler_list {
5454
handlers.builtin.push(handler);
5555
}
5656
cfg.set_extension(Arc::new(handlers));

src/events/defaults/routing.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ pub(crate) fn single_task_coordinator_routing(
4949
pub(crate) fn single_task_child_url_routing(
5050
ev: RouteTasksEvent,
5151
) -> Option<Result<RouteTasksEventResponse>> {
52+
if ev.task_count != 1 {
53+
return None;
54+
}
5255
let mut single_stage_url = None;
5356
ev.plan
5457
.apply(|plan| {

0 commit comments

Comments
 (0)