jenkins-bot has submitted this change and it was merged.
Change subject: Ensure some configs are reasonable
......................................................................
Ensure some configs are reasonable
Change-Id: I9c19c90984b672d669052fcba667112317920b69
---
M lib/cli.js
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
Cscott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/cli.js b/lib/cli.js
index 7f1889c..d90522e 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -1,8 +1,9 @@
// common code for cli scripts.
"use strict";
-var fs = require( 'fs' );
-var path = require( 'path' );
+var fs = require( 'fs' ),
+ path = require( 'path' ),
+ assert = require( 'assert' );
var relativeTo = function(base, file) {
if ( path.resolve( file ) !== path.normalize( file ) ) {
@@ -44,6 +45,13 @@
console.error( "Could not open configuration file %s! %s",
commander_config, err );
process.exit( 1 );
}
+
+ /* ensure some config checks */
+ assert(
+ config.frontend.failed_job_lockout_time <=
config.garbage_collection.failed_job_lifetime,
+ "Failed jobs shouldn't be gc'd before the lockout time expires."
+ );
+
return config;
};
--
To view, visit https://gerrit.wikimedia.org/r/168706
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9c19c90984b672d669052fcba667112317920b69
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits