forked from LBRYCommunity/lbry-sdk
multiple search servers
This commit is contained in:
parent
d21e458fe1
commit
a574c33ac6
2 changed files with 5 additions and 3 deletions
|
@ -24,7 +24,9 @@ KNOWN_DHT_NODES = [('104.236.42.182', 4000),
|
||||||
|
|
||||||
POINTTRADER_SERVER = 'http://ec2-54-187-192-68.us-west-2.compute.amazonaws.com:2424'
|
POINTTRADER_SERVER = 'http://ec2-54-187-192-68.us-west-2.compute.amazonaws.com:2424'
|
||||||
#POINTTRADER_SERVER = 'http://127.0.0.1:2424'
|
#POINTTRADER_SERVER = 'http://127.0.0.1:2424'
|
||||||
SEARCH_SERVER = "http://45.63.4.203:50005"
|
SEARCH_SERVERS = ["http://lighthouse1.lbry.io:50005",
|
||||||
|
"http://lighthouse2.lbry.io:50005",
|
||||||
|
"http://lighthouse3.lbry.io:50005"]
|
||||||
|
|
||||||
LOG_FILE_NAME = "lbrynet.log"
|
LOG_FILE_NAME = "lbrynet.log"
|
||||||
LOG_POST_URL = "https://lbry.io/log-upload"
|
LOG_POST_URL = "https://lbry.io/log-upload"
|
||||||
|
|
|
@ -47,7 +47,7 @@ from lbrynet.core.utils import generate_id
|
||||||
from lbrynet.lbrynet_console.LBRYSettings import LBRYSettings
|
from lbrynet.lbrynet_console.LBRYSettings import LBRYSettings
|
||||||
from lbrynet.conf import MIN_BLOB_DATA_PAYMENT_RATE, DEFAULT_MAX_SEARCH_RESULTS, KNOWN_DHT_NODES, DEFAULT_MAX_KEY_FEE, \
|
from lbrynet.conf import MIN_BLOB_DATA_PAYMENT_RATE, DEFAULT_MAX_SEARCH_RESULTS, KNOWN_DHT_NODES, DEFAULT_MAX_KEY_FEE, \
|
||||||
DEFAULT_WALLET, DEFAULT_SEARCH_TIMEOUT, DEFAULT_CACHE_TIME, DEFAULT_UI_BRANCH, LOG_POST_URL, LOG_FILE_NAME, SOURCE_TYPES
|
DEFAULT_WALLET, DEFAULT_SEARCH_TIMEOUT, DEFAULT_CACHE_TIME, DEFAULT_UI_BRANCH, LOG_POST_URL, LOG_FILE_NAME, SOURCE_TYPES
|
||||||
from lbrynet.conf import SEARCH_SERVER
|
from lbrynet.conf import SEARCH_SERVERS
|
||||||
from lbrynet.conf import DEFAULT_TIMEOUT, WALLET_TYPES
|
from lbrynet.conf import DEFAULT_TIMEOUT, WALLET_TYPES
|
||||||
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier, download_sd_blob
|
from lbrynet.core.StreamDescriptor import StreamDescriptorIdentifier, download_sd_blob
|
||||||
from lbrynet.core.Session import LBRYSession
|
from lbrynet.core.Session import LBRYSession
|
||||||
|
@ -1417,7 +1417,7 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
||||||
return defer.succeed(None)
|
return defer.succeed(None)
|
||||||
|
|
||||||
def _search(self, search):
|
def _search(self, search):
|
||||||
proxy = Proxy(SEARCH_SERVER)
|
proxy = Proxy(random.choice(SEARCH_SERVERS))
|
||||||
return proxy.callRemote('search', search)
|
return proxy.callRemote('search', search)
|
||||||
|
|
||||||
def _render_response(self, result, code):
|
def _render_response(self, result, code):
|
||||||
|
|
Loading…
Reference in a new issue