> On Oct. 1, 2014, 4:34 p.m., Kevin Sweeney wrote: > > src/main/python/apache/aurora/executor/common/announcer.py, line 228 > > <https://reviews.apache.org/r/25974/diff/6/?file=709964#file709964line228> > > > > push this into `__start`, out of the constructor? > > > > At least on the Java side we try to avoid doing any I/O in constructors > > (as they're more for wiring) but instead delegate to explicit lifecycle > > methods like `start`. > > Zameer Manji wrote: > I'd rather not. Keeping it in the constructor means it stays in the > from_assigned_task method code path. Moving it to the start method moves it > out of that code path and really changes when we do this sort of I/O.
is it common practice to do I/O in constructors elsewhere in this codebase? I'll defer to wickman here - Kevin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25974/#review55161 ----------------------------------------------------------- On Sept. 30, 2014, 5:17 p.m., Zameer Manji wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25974/ > ----------------------------------------------------------- > > (Updated Sept. 30, 2014, 5:17 p.m.) > > > Review request for Aurora, Kevin Sweeney, Bill Farner, and Brian Wickman. > > > Bugs: AURORA-728 > https://issues.apache.org/jira/browse/AURORA-728 > > > Repository: aurora > > > Description > ------- > > Prevent initial ZK timeouts from killing the executor. In addition, prevent > uncaught exceptions from killing the executor. > > > Diffs > ----- > > src/main/python/apache/aurora/executor/aurora_executor.py > 79a24855b2a68271b7478395dfdadab8755c3af2 > src/main/python/apache/aurora/executor/common/announcer.py > c466da8d48bbc2aa227c2db157cab84665ad6602 > src/test/python/apache/aurora/executor/common/test_announcer.py > 4f6e200ecb1a4ea7cb45acd466a57f19d5815326 > > Diff: https://reviews.apache.org/r/25974/diff/ > > > Testing > ------- > > ./pants src/test/python/apache/aurora/executor:executor-small > ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh > > > Thanks, > > Zameer Manji > >