Questions tagged [Tornado] (88)

0
answer

How to configure Nginx-Tornado-Websocket?

Help to configure Nginx-Tornado-Websocket. Using Nginx to load only static, switching to Websocket no. Standalone (without Nginx) app Tornado works fine on the 9001 port for the settings.define("port", default=9001) Handlers:handlers = [ (r"/", MainHandler), (r"/botsocket", BotSocketHandler), ] Switching to Websocket (js)...
beryl72 asked March 19th 20 at 10:27
1
answer

Why doesn't unix socket (nginx + tornado)?

18.04 use ubuntu server, nginx and tornado To start tornado, use the following code:class Main: PORT_MASK = '111{}' PATH_MASK = '/tmp/111_{}' SETTINGS = {} ROUTE = [] def __init__(self, use_unix_socket=False): server = tornado.httpserver.HTTPServer(tornado.web.Application(self.ROUTE, **self.SETTINGS)) if use_unix...
Rob asked March 18th 20 at 20:26
3
answers

How to log web application in Python?

Actually the question in the title. Set a goal to fully salaryrate your application to track the statistics of visits and control of sauzaie on the type of ddos, brute force, etc. But how best to do this? To begin, I chose json and began to trace a rather large number of parameters, but the log using standard means uwsgi pr...
jace_Quigley asked March 17th 20 at 13:19
2
answers

Where, in proxying, must have a certificate installed?

I use the following syntax in the settings of Nginx to redirect requests to the Tornado server server { listen 80; listen [::]:80; server_name my.ru; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443; listen [::]:443; server_name my.ru; location / { proxy_pass https://localhost:22817/; ...
Gerson27 asked March 17th 20 at 13:09
1
answer

How to use mongoengine.connect when multiprocessing?

In my project there is a module containing models of documents. At the end of the file there is a line from the official documentation, mongoengine connect(DB_HOST) Further, all calls to this module occur within the tornado-processes, for examplefrom core import models ... owners = models.Owner.objects() ... However, in the...
Dane95 asked March 17th 20 at 10:17
2
answers

How to asynchronously transmit messages to WebSocket?

I have a list of the websocket clients. Now to send the message to all clients I use too much of this list:for client in ws_clients: client.write_message("hello") But even with a large number of clients there is a substantial delay between receiving the first and the last client in the list. Is there a way to send messag...
alex.Goyette asked March 16th 20 at 13:11
1
answer

Why tornado blocks headers?

Need headers to let the Authorization with a particular key. If you set the headers directly through the methods options and set_default_headers then everything is OK. But in the code more than 100 handlers and every to hang your options not comme Il faut. So it is workingclass LongPollingHandler(tornado.web.RequestHandler...
Katarina.Mayert25 asked March 15th 20 at 23:50
1
answer

Why Tornado ignores ALL POST requests?

Server on Ubuntu Server 18.04, any specific settings ifconfig, and so no (default).GENERAL_ROUTE = ((r"/(.*)", tornado.web.StaticFileHandler, {"path": settings.DIR_WWW_FILES, "default_filename": "index.html"}), (r"/vk/(.*?):(.*?)", handlers.VkCB), (r"/tg/(.*?)", handlers.Tg), (r"/donate/notification", handlers.Fk),) HT...
Leola asked March 12th 20 at 11:24
1
answer

Tornado.database asynchronous or not?

When studying API Tornado arose the next question. Tornado provides a kind of wrapper to access MySQL:www.tornadoweb.org/documentation/database.html But in the documentation no word about callaci hung on the query method (and the like). Do I understand correctly that in one process (and in fact this is exactly how Tornado),...
Cecil.Kovace asked October 8th 19 at 01:39
1
answer

Is there an asynchronous MySQL driver for Python to work with the Tornado?

Is there anyway this miracle of nature? Active gugleniya did not help. I agree txMySQL, if you give an example using Tornado.IOLoop
Vince.Wolf asked October 7th 19 at 16:29