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 +6,16 @@ from tracim.lib.daemons import DaemonsManager
6 6
 
7 7
 
8 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 19
     def __init__(
10 20
             self,
11 21
             tracim_process_pid: int,
@@ -41,6 +51,4 @@ class InterruptManager(object):
41 51
         """
42 52
         self._remove_signal_handlers()
43 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 54
         os.kill(self.tracim_process_pid, signum)