forked from indymedia/epicyon
partial import
parent
88c7e49aa5
commit
602315dde1
|
@ -12,6 +12,7 @@ import json
|
||||||
import time
|
import time
|
||||||
import base64
|
import base64
|
||||||
import locale
|
import locale
|
||||||
|
from functools import partial
|
||||||
# used for mime decoding of message POST
|
# used for mime decoding of message POST
|
||||||
import email.parser
|
import email.parser
|
||||||
# for saving images
|
# for saving images
|
||||||
|
@ -5657,10 +5658,10 @@ def runDaemon(mediaInstance: bool,maxRecentPosts: int, \
|
||||||
|
|
||||||
serverAddress = ('', proxyPort)
|
serverAddress = ('', proxyPort)
|
||||||
if unitTest:
|
if unitTest:
|
||||||
httpd = ThreadingHTTPServer(serverAddress, PubServerUnitTest)
|
pubHandler = partial(PubServerUnitTest)
|
||||||
else:
|
else:
|
||||||
pubHandler = partial(PubServer)
|
pubHandler = partial(PubServer)
|
||||||
httpd = ThreadingHTTPServer(serverAddress, pubHandler)
|
httpd = ThreadingHTTPServer(serverAddress, pubHandler)
|
||||||
|
|
||||||
httpd.useBlurHash=useBlurHash
|
httpd.useBlurHash=useBlurHash
|
||||||
httpd.mediaInstance=mediaInstance
|
httpd.mediaInstance=mediaInstance
|
||||||
|
@ -5832,7 +5833,7 @@ def runDaemon(mediaInstance: bool,maxRecentPosts: int, \
|
||||||
print('Creating scheduled post thread')
|
print('Creating scheduled post thread')
|
||||||
httpd.thrPostSchedule= \
|
httpd.thrPostSchedule= \
|
||||||
threadWithTrace(target=runPostSchedule, \
|
threadWithTrace(target=runPostSchedule, \
|
||||||
args=(baseDir,httpd,20),daemon=True)
|
args=(baseDir,pubHandler,20),daemon=True)
|
||||||
if not unitTest:
|
if not unitTest:
|
||||||
print('Creating inbox queue watchdog')
|
print('Creating inbox queue watchdog')
|
||||||
httpd.thrWatchdog= \
|
httpd.thrWatchdog= \
|
||||||
|
|
Loading…
Reference in New Issue