Changeset View
Changeset View
Standalone View
Standalone View
swh/vault/api/server.py
# Copyright (C) 2016 The Software Heritage developers | # Copyright (C) 2016-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import aiohttp.web | import aiohttp.web | ||||
import asyncio | import asyncio | ||||
import click | import click | ||||
import collections | import collections | ||||
Show All 26 Lines | 'cache': ('dict', { | ||||
'cls': 'pathslicing', | 'cls': 'pathslicing', | ||||
'args': { | 'args': { | ||||
'root': '/srv/softwareheritage/vault', | 'root': '/srv/softwareheritage/vault', | ||||
'slicing': '0:1/1:5', | 'slicing': '0:1/1:5', | ||||
}, | }, | ||||
}), | }), | ||||
'client_max_size': ('int', 1024 ** 3), | 'client_max_size': ('int', 1024 ** 3), | ||||
'db': ('str', 'dbname=softwareheritage-vault-dev'), | 'db': ('str', 'dbname=softwareheritage-vault-dev'), | ||||
'scheduling_db': ('str', 'dbname=softwareheritage-scheduler-dev'), | 'scheduler': ('dict', { | ||||
'cls': 'remote', | |||||
'args': { | |||||
'url': 'http://localhost:5008/', | |||||
} | |||||
}), | |||||
seirl: Aren't the default usually the remote services, and not the local ones? | |||||
Done Inline ActionsI kept your default because i did not want to impose anything. But sure, we can use the remote one. ardumont: I kept your default because i did not want to impose anything.
Running this by default, you… | |||||
Done Inline ActionsAlso, i'm matching the other default configuration of that very same file. ardumont: Also, i'm matching the other default configuration of that very same file.
No other entry in… | |||||
Done Inline ActionsOk, so i had a remark about this on D372#inline-1828 that goes your way. Cheers, ardumont: Ok, so i had a remark about this on D372#inline-1828 that goes your way.
So fixing this. | |||||
} | } | ||||
@asyncio.coroutine | @asyncio.coroutine | ||||
def index(request): | def index(request): | ||||
return aiohttp.web.Response(body="SWH Vault API server") | return aiohttp.web.Response(body="SWH Vault API server") | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |
Aren't the default usually the remote services, and not the local ones?