Fix default receive.timeout
This should be in milliseconds, not seconds. Set the default to be 2 minutes in milliseconds and update the documentation to reflect that milliseconds are the default unit of time used here. Change-Id: I50d74e91f4acec2b91daf59a16966cb89045d064
This commit is contained in:
@@ -1716,11 +1716,14 @@ Defaults to the number of available CPUs according to the Java runtime.
|
|||||||
|
|
||||||
[[receive.timeout]]receive.timeout::
|
[[receive.timeout]]receive.timeout::
|
||||||
+
|
+
|
||||||
Overall timeout on the time taken to process the change data in received packs.
|
Overall timeout on the time taken to process the change data in
|
||||||
Only includes the time processing Gerrit changes and updating references, not
|
received packs. Only includes the time processing Gerrit changes
|
||||||
the time to index the pack.
|
and updating references, not the time to index the pack. Values can
|
||||||
|
be specified using standard time unit abbreviations ('ms', 'sec',
|
||||||
|
'min', etc.).
|
||||||
+
|
+
|
||||||
Default is 120 seconds.
|
Default is 2 minutes. If no unit is specified, millisconds
|
||||||
|
is assumed.
|
||||||
|
|
||||||
|
|
||||||
[[repository]]Section repository
|
[[repository]]Section repository
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ public class AsyncReceiveCommits implements PreReceiveHook {
|
|||||||
long getTimeoutMillis(@GerritServerConfig final Config cfg) {
|
long getTimeoutMillis(@GerritServerConfig final Config cfg) {
|
||||||
return ConfigUtil.getTimeUnit(
|
return ConfigUtil.getTimeUnit(
|
||||||
cfg, "receive", null, "timeout",
|
cfg, "receive", null, "timeout",
|
||||||
TimeUnit.SECONDS.convert(2, TimeUnit.MINUTES),
|
TimeUnit.MINUTES.toMillis(2),
|
||||||
TimeUnit.SECONDS);
|
TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user