Commits

Anonymous committed 7f4ae99

Implemented the restart action and return pids for confirmation

Comments (0)

Files changed (1)

dad/web/plugins/manager.py

         return info
 
     def restart_app(self, name, conf, **kw):
-        pass
+        stop_result = self.stop_app(name, conf, **kw)
+        return self.start_app(name, conf, **kw)
     
     def stop_app(self, name, conf, **kw):
         results = {}
             else:
                 self.processes[name][port] = proc
 
-        return {'started': name, 'num_instances': conf.get('instances', 1)}
+        return {'started': name,
+                'num_instances': conf.get('instances', 1),
+                'pids': [proc.pid
+                         for name, procs in self.processes.iteritems()
+                         for port, proc in procs.iteritems()]}