kopia lustrzana https://github.com/bugout-dev/moonstream
Add internal timeout.
rodzic
3b1ff405c4
commit
73df559c3e
|
@ -32,6 +32,7 @@ from ..settings import (
|
||||||
MOONSTREAM_APPLICATION_ID,
|
MOONSTREAM_APPLICATION_ID,
|
||||||
MOONSTREAM_CRAWLERS_SERVER_PORT,
|
MOONSTREAM_CRAWLERS_SERVER_PORT,
|
||||||
MOONSTREAM_CRAWLERS_SERVER_URL,
|
MOONSTREAM_CRAWLERS_SERVER_URL,
|
||||||
|
MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS,
|
||||||
MOONSTREAM_QUERIES_JOURNAL_ID,
|
MOONSTREAM_QUERIES_JOURNAL_ID,
|
||||||
MOONSTREAM_QUERY_TEMPLATE_CONTEXT_TYPE,
|
MOONSTREAM_QUERY_TEMPLATE_CONTEXT_TYPE,
|
||||||
MOONSTREAM_S3_QUERIES_BUCKET,
|
MOONSTREAM_S3_QUERIES_BUCKET,
|
||||||
|
@ -473,7 +474,7 @@ async def update_query_data_handler(
|
||||||
if request_update.blockchain
|
if request_update.blockchain
|
||||||
else None,
|
else None,
|
||||||
},
|
},
|
||||||
timeout=5,
|
timeout=MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error interaction with crawlers: {str(e)}")
|
logger.error(f"Error interaction with crawlers: {str(e)}")
|
||||||
|
|
|
@ -259,3 +259,11 @@ supportsInterface_abi = [
|
||||||
"type": "function",
|
"type": "function",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS = os.environ.get(
|
||||||
|
"MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS", "10"
|
||||||
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS = int(
|
||||||
|
MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS
|
||||||
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue