Skip to content
Snippets Groups Projects
Commit 8b835e5b authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

Private clone-bundles: making expity configuratble

Forgot to amend that one.
parent 12bbda0d
No related branches found
No related tags found
1 merge request!120Private clone-bundles: making expity configuratble
Pipeline #101360 passed
......@@ -107,6 +107,8 @@
configitem(b'heptapod', b'clone-bundles.s3.secret_key', b'')
configitem(b'heptapod', b'clone-bundles.s3.region', b'')
configitem(b'heptapod', b'clone-bundles.s3.public.with-acl', False)
configitem(b'heptapod', b'clone-bundles.s3.private.url-expiry-seconds',
7200)
cmdtable = {}
command = registrar.command(cmdtable)
......@@ -687,7 +689,10 @@
return client.generate_presigned_url(
'get_object',
Params={'Bucket': bucket, 'Key': bucket_rpath},
ExpiresIn=7200, # TODO hardcoded
ExpiresIn=repo.ui.configint(
b'heptapod',
b'clone-bundles.s3.private.url-expiry-seconds'
),
).encode('ascii')
else:
return url
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment