##// END OF EJS Templates
expose IPClusterEngines.daemonize as `--daemonize` flag....
MinRK -
Show More
@@ -77,6 +77,7 b' class BaseIPythonApplication(Application):'
77
77
78 aliases = Dict(base_aliases)
78 aliases = Dict(base_aliases)
79 flags = Dict(base_flags)
79 flags = Dict(base_flags)
80 classes = List([ProfileDir])
80
81
81 # Track whether the config_file has changed,
82 # Track whether the config_file has changed,
82 # because some logic happens only if we aren't using the default.
83 # because some logic happens only if we aren't using the default.
@@ -120,9 +120,8 b" otherwise use the 'profile_dir' option."
120 """
120 """
121 stop_aliases = dict(
121 stop_aliases = dict(
122 signal='IPClusterStop.signal',
122 signal='IPClusterStop.signal',
123 profile='BaseIPythonApplication.profile',
124 profile_dir='ProfileDir.location',
125 )
123 )
124 stop_aliases.update(base_aliases)
126
125
127 class IPClusterStop(BaseParallelApplication):
126 class IPClusterStop(BaseParallelApplication):
128 name = u'ipcluster'
127 name = u'ipcluster'
@@ -181,6 +180,16 b' engine_aliases.update(base_aliases)'
181 engine_aliases.update(dict(
180 engine_aliases.update(dict(
182 n='IPClusterEngines.n',
181 n='IPClusterEngines.n',
183 elauncher = 'IPClusterEngines.engine_launcher_class',
182 elauncher = 'IPClusterEngines.engine_launcher_class',
183 daemonize = 'IPClusterEngines.daemonize',
184 ))
185 engine_flags = {}
186 engine_flags.update(base_flags)
187
188 engine_flags.update(dict(
189 daemonize=(
190 {'IPClusterEngines' : {'daemonize' : True}},
191 """run the cluster into the background (not available on Windows)""",
192 )
184 ))
193 ))
185 class IPClusterEngines(BaseParallelApplication):
194 class IPClusterEngines(BaseParallelApplication):
186
195
@@ -204,14 +213,16 b' class IPClusterEngines(BaseParallelApplication):'
204 help="The class for launching a set of Engines."
213 help="The class for launching a set of Engines."
205 )
214 )
206 daemonize = Bool(False, config=True,
215 daemonize = Bool(False, config=True,
207 help='Daemonize the ipcluster program. This implies --log-to-file')
216 help="""Daemonize the ipcluster program. This implies --log-to-file.
217 Not available on Windows.
218 """)
208
219
209 def _daemonize_changed(self, name, old, new):
220 def _daemonize_changed(self, name, old, new):
210 if new:
221 if new:
211 self.log_to_file = True
222 self.log_to_file = True
212
223
213 aliases = Dict(engine_aliases)
224 aliases = Dict(engine_aliases)
214 # flags = Dict(flags)
225 flags = Dict(engine_flags)
215 _stopping = False
226 _stopping = False
216
227
217 def initialize(self, argv=None):
228 def initialize(self, argv=None):
General Comments 0
You need to be logged in to leave comments. Login now