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:
Johanna Amann 2019-06-25 13:29:41 -07:00
parent f810de11fa
commit 3ec9fb0f7f
4 changed files with 98 additions and 91 deletions

View file

@ -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();
}