mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
Increasing archive response timeout.
This commit is contained in:
parent
75169462e3
commit
9a94de0314
2 changed files with 10 additions and 0 deletions
|
|
@ -22,7 +22,14 @@ formatter = logging.Formatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(messag
|
|||
ch.setFormatter(formatter)
|
||||
logger.addHandler(ch)
|
||||
|
||||
# Increase response timeout, archiving can take several minutes.
|
||||
RESPONSE_TIMEOUT = 10 * 60
|
||||
config = {
|
||||
'RESPONSE_TIMEOUT': RESPONSE_TIMEOUT,
|
||||
}
|
||||
|
||||
app = Sanic('archive')
|
||||
app.update_config(config)
|
||||
|
||||
index_html = '''
|
||||
<html>
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ def request_archive(url: str):
|
|||
except Exception as e:
|
||||
logger.error('Error when requesting archive', exc_info=e)
|
||||
raise
|
||||
|
||||
logger.debug(f'archive request status {resp.status_code=}')
|
||||
|
||||
readability = resp.json()['readability']
|
||||
# Compressed base64
|
||||
singlefile = resp.json()['singlefile']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue