|
@@ -253,6 +253,15 @@ def get_pid(name):
|
253
|
253
|
##@brief Start an instance
|
254
|
254
|
#@param names list : instance name list
|
255
|
255
|
def start_instances(names, foreground):
|
|
256
|
+ from lodel.context import LodelContext
|
|
257
|
+ for name in names:
|
|
258
|
+ if name in LodelContext._contexts:
|
|
259
|
+ logging.warning("The instance %s is already activated" % name)
|
|
260
|
+ continue
|
|
261
|
+ LodelContext.from_path(name)
|
|
262
|
+ logging.info("Instance '%s' started.")
|
|
263
|
+
|
|
264
|
+ '''
|
256
|
265
|
pids = get_pids()
|
257
|
266
|
store_datas = get_store_datas()
|
258
|
267
|
|
|
@@ -274,6 +283,7 @@ def start_instances(names, foreground):
|
274
|
283
|
pids[name] = curexec.pid
|
275
|
284
|
logging.info("Instance '%s' started. PID %d" % (name, curexec.pid))
|
276
|
285
|
save_pids(pids)
|
|
286
|
+ '''
|
277
|
287
|
|
278
|
288
|
##@brief Stop an instance given its name
|
279
|
289
|
#@param names list : names list
|