Browse Source

Add doc in InterruptManager

Bastien Sevajol (Algoo) 8 years ago
parent
commit
17a300dbd0
1 changed files with 10 additions and 2 deletions
  1. 10 2
      tracim/tracim/lib/system.py

+ 10 - 2
tracim/tracim/lib/system.py View File

6
 
6
 
7
 
7
 
8
 class InterruptManager(object):
8
 class InterruptManager(object):
9
+    """
10
+    Manager interruption of tracim components.
11
+
12
+    Stop all tracim daemons, then:
13
+
14
+    With a specific production server like uWSGI, we should use master
15
+    FIFO system to exit properly the program:
16
+    https://github.com/unbit/uwsgi/issues/849. But to be generic, we resend the
17
+    signal after intercept it.
18
+    """
9
     def __init__(
19
     def __init__(
10
             self,
20
             self,
11
             tracim_process_pid: int,
21
             tracim_process_pid: int,
41
         """
51
         """
42
         self._remove_signal_handlers()
52
         self._remove_signal_handlers()
43
         self.daemons_manager.stop_all()
53
         self.daemons_manager.stop_all()
44
-        # Web server is managed by end of stack like uwsgi, apache2.
45
-        # So to ask it's termination, we have to use standard kills signals
46
         os.kill(self.tracim_process_pid, signum)
54
         os.kill(self.tracim_process_pid, signum)