allow larger drag&drop uploads (up to 2GB)
This commit is contained in:
parent
91dbea8f10
commit
637feaee55
2 changed files with 4 additions and 6 deletions
|
@ -6,7 +6,6 @@ import sys
|
|||
import signal
|
||||
import time
|
||||
|
||||
from tornado.httpserver import HTTPServer
|
||||
from tornado.ioloop import IOLoop
|
||||
from tornado.web import StaticFileHandler, Application
|
||||
|
||||
|
@ -71,7 +70,6 @@ def shutdown():
|
|||
logger.debug('shutdown downloads')
|
||||
state.downloads.join()
|
||||
logger.debug('shutdown http_server')
|
||||
state.http_server.stop()
|
||||
if state.tasks:
|
||||
logger.debug('shutdown tasks')
|
||||
state.tasks.join()
|
||||
|
@ -135,8 +133,9 @@ def run():
|
|||
]
|
||||
|
||||
setup.create_db()
|
||||
http_server = HTTPServer(Application(handlers, **options))
|
||||
http_server.listen(settings.server['port'], settings.server['address'])
|
||||
http_server = Application(handlers, **options)
|
||||
max_buffer_size = 2*1024*1024*1024
|
||||
http_server.listen(settings.server['port'], settings.server['address'], max_buffer_size=max_buffer_size)
|
||||
|
||||
if PID:
|
||||
with open(PID, 'w') as pid:
|
||||
|
|
|
@ -57,11 +57,10 @@ class Handler(WebSocketHandler):
|
|||
|
||||
def post(self, event, data):
|
||||
message = json_dumps([event, data])
|
||||
main = IOLoop.instance()
|
||||
if self.ws_connection is None:
|
||||
self.on_close()
|
||||
else:
|
||||
main.add_callback(lambda: self.write_message(message))
|
||||
state.main.add_callback(lambda: self.write_message(message))
|
||||
|
||||
def trigger_event(event, data):
|
||||
#if len(state.websockets):
|
||||
|
|
Loading…
Reference in a new issue