Ivars 5 years ago
parent
commit
054de700a5
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      playstreamproxy.py

+ 4
- 3
playstreamproxy.py View File

1
 #!/usr/bin/python
1
 #!/usr/bin/python
2
 # -*- coding: utf-8 -*-
2
 # -*- coding: utf-8 -*-
3
 """
3
 """
4
-StreamProxy daemon (based on Livestream daemon)
4
+Playstreamproxy daemon (based on Livestream daemon)
5
 Provides API to ContetSources + stream serving to play via m3u8 playlists
5
 Provides API to ContetSources + stream serving to play via m3u8 playlists
6
 """
6
 """
7
+
7
 import os, sys, time, re, json
8
 import os, sys, time, re, json
8
 import ConfigParser
9
 import ConfigParser
9
 import atexit
10
 import atexit
309
     httpd.server_close()
310
     httpd.server_close()
310
     print time.asctime(), "Server Stops - %s:%s" % (HOST_NAME, PORT_NUMBER)
311
     print time.asctime(), "Server Stops - %s:%s" % (HOST_NAME, PORT_NUMBER)
311
 
312
 
312
-def start2(host = HOST_NAME, port = PORT_NUMBER, redirect=REDIRECT):
313
+def start2(host = HOST_NAME, port = PORT_NUMBER, redirect=REDIRECT,workers=WORKERS):
313
     global REDIRECT
314
     global REDIRECT
314
     if redirect:
315
     if redirect:
315
         REDIRECT = redirect
316
         REDIRECT = redirect
337
             httpd.server_bind = self.server_close = lambda self: None
338
             httpd.server_bind = self.server_close = lambda self: None
338
 
339
 
339
             httpd.serve_forever()
340
             httpd.serve_forever()
340
-    [Thread(i) for i in range(10)]
341
+    [Thread(i) for i in range(workers)]
341
     time.sleep(9e5)
342
     time.sleep(9e5)
342
     print time.asctime(), "Server Stops - %s:%s" % (HOST_NAME, PORT_NUMBER)
343
     print time.asctime(), "Server Stops - %s:%s" % (HOST_NAME, PORT_NUMBER)
343
 
344