moonraker: configure the tornado http client to use the curl backend
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
73d3eae8ae
commit
e76e83d8c1
|
@ -460,8 +460,6 @@ class CommandHelper:
|
|||
self.scmd_error = shell_cmd.error
|
||||
self.build_shell_command = shell_cmd.build_shell_command
|
||||
self.pkg_updater: Optional[PackageDeploy] = None
|
||||
|
||||
AsyncHTTPClient.configure(None, defaults=dict(user_agent="Moonraker"))
|
||||
self.http_client = AsyncHTTPClient()
|
||||
self.github_request_cache: Dict[str, CachedGithubResponse] = {}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
import argparse
|
||||
from asyncio.events import new_event_loop
|
||||
import sys
|
||||
import importlib
|
||||
import os
|
||||
|
@ -21,6 +20,7 @@ import confighelper
|
|||
import utils
|
||||
import asyncio
|
||||
from tornado import iostream
|
||||
from tornado.httpclient import AsyncHTTPClient
|
||||
from eventloop import EventLoop
|
||||
from app import MoonrakerApp
|
||||
from utils import ServerError, SentinelClass
|
||||
|
@ -56,6 +56,11 @@ CORE_COMPONENTS = [
|
|||
|
||||
SENTINEL = SentinelClass.get_instance()
|
||||
|
||||
# Configure the http client to use the pycurl based implementation
|
||||
AsyncHTTPClient.configure(
|
||||
"tornado.curl_httpclient.CurlAsyncHTTPClient",
|
||||
defaults=dict(user_agent="Moonraker"))
|
||||
|
||||
class Server:
|
||||
error = ServerError
|
||||
def __init__(self,
|
||||
|
|
Loading…
Reference in New Issue