Merge pull request #1210 from jzelinskie/torrent-life

extend torrent webseed lifetime to an hour
This commit is contained in:
Jimmy Zelinskie 2016-02-09 14:51:26 -05:00
commit deadd5eee3
2 changed files with 3 additions and 1 deletions

View file

@ -137,7 +137,8 @@ def _torrent_for_storage(storage_ref, is_public):
# Lookup the webseed path for the storage.
path = model.storage.get_layer_path(storage_ref)
webseed = storage.get_direct_download_url(storage_ref.locations, path)
webseed = storage.get_direct_download_url(storage_ref.locations, path,
expires_in=app.config['BITTORRENT_WEBSEED_LIFETIME'])
if webseed is None:
# We cannot support webseeds for storages that cannot provide direct downloads.
abort(make_response('Storage engine does not support seeding.', 501))