Erlang supervisor restart interval
I have a supervisor with one_for_one restart strategy. Is it possible to set some time interval between child process restarting?
Fe remote db crushed and I want to wait 10 seconds between restore connection attempt.
Actually, you could let the supervisor to immediately restart its children and implement what is called lazy initialization:
This way, you ensure that all requests to the gen_server are processed after the DB is properly initialized.
链接地址: http://www.djcxy.com/p/6510.html下一篇: Erlang管理员重启间隔