mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Change notices to be processed on worker.
In the past they were processed on the manager - which requires big records to be sent around. This has a potential of incompatibilities if someone relied on global state for notice processing. GH-214
This commit is contained in:
parent
f810de11fa
commit
3ec9fb0f7f
4 changed files with 98 additions and 91 deletions
|
@ -33,9 +33,15 @@ event delayed_notice()
|
|||
NOTICE([$note=Test_Notice, $msg="test notice!"]);
|
||||
}
|
||||
|
||||
event terminate_me()
|
||||
{
|
||||
terminate();
|
||||
}
|
||||
|
||||
event ready()
|
||||
{
|
||||
schedule 1secs { delayed_notice() };
|
||||
schedule 2secs { terminate_me() };
|
||||
}
|
||||
|
||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
||||
|
@ -50,7 +56,7 @@ event Cluster::node_up(name: string, id: string)
|
|||
Broker::publish(Cluster::worker_topic, ready);
|
||||
}
|
||||
|
||||
event Notice::log_notice(rec: Notice::Info)
|
||||
event Cluster::node_down(name: string, id: string)
|
||||
{
|
||||
terminate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue