jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/384624 )
Change subject: Shell\Command: Better walltime fallback
......................................................................
Shell\Command: Better walltime fallback
Previously, it assumed that the only way times could be overridden is to
reduce the limits - which isn't the case for video transcoding.
Bug: T178314
Change-Id: I492a44f280a36ee666e9963788caac2bbc6bc6f3
---
M includes/shell/Command.php
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/shell/Command.php b/includes/shell/Command.php
index d5a1bb3..4fc282c 100644
--- a/includes/shell/Command.php
+++ b/includes/shell/Command.php
@@ -135,6 +135,11 @@
* @return $this
*/
public function limits( array $limits ) {
+ if ( !isset( $limits['walltime'] ) && isset( $limits['time'] )
) {
+ // Emulate the behavior of old wfShellExec() where
walltime fell back on time
+ // if the latter was overridden and the former wasn't
+ $limits['walltime'] = $limits['time'];
+ }
$this->limits = $limits + $this->limits;
return $this;
@@ -227,8 +232,6 @@
if ( is_executable( '/bin/bash' ) ) {
$time = intval( $this->limits['time'] );
$wallTime = intval( $this->limits['walltime'] );
- // for b/c, wall time falls back to time
- $wallTime = min( $time, $wallTime );
$mem = intval( $this->limits['memory'] );
$filesize = intval( $this->limits['filesize'] );
--
To view, visit https://gerrit.wikimedia.org/r/384624
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I492a44f280a36ee666e9963788caac2bbc6bc6f3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits