Dan-nl has uploaded a new change for review.
https://gerrit.wikimedia.org/r/100942
Change subject: consistent-job-delay
......................................................................
consistent-job-delay
adding the job delay to each createMetadataBatchJob to make sure that
the extension doesn’t take over the job queue. also adjusted the job
queue throttle defaults.
Change-Id: Ic984f52b4cddd7b04ca11d6af45e85a9b6c1d7ba
---
M includes/Config.php
M includes/Handlers/Forms/MetadataMappingHandler.php
2 files changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset
refs/changes/42/100942/1
diff --git a/includes/Config.php b/includes/Config.php
index 53e6766..5b4b512 100644
--- a/includes/Config.php
+++ b/includes/Config.php
@@ -81,7 +81,7 @@
* Config::$metadata_job_max_attempts times to add to the additional
* UploadMediafileJob’s before failing.
*/
- public static $mediafile_job_queue_max = 3000;
+ public static $mediafile_job_queue_max = 1000;
/**
* @var {array}
@@ -119,7 +119,7 @@
* used in conjunction with the job param jobReleaseTimestamp when the
job queue
* delayedJobsEnabled() is true, e.g., JobQueueRedis
*/
- public static $metadata_job_delay = '10 minutes';
+ public static $metadata_job_delay = '3 minutes';
/**
* @var {int}
@@ -128,7 +128,7 @@
* Config::$metadata_job_max_attempts has been reached and if used, can
indicate
* an issue with the job queue clearing out UploadMediafileJob’s.
*/
- public static $metadata_job_max_attempts = 5;
+ public static $metadata_job_max_attempts = 10;
/**
* @var {string}
diff --git a/includes/Handlers/Forms/MetadataMappingHandler.php
b/includes/Handlers/Forms/MetadataMappingHandler.php
index 0d1872e..5f6afa3 100644
--- a/includes/Handlers/Forms/MetadataMappingHandler.php
+++ b/includes/Handlers/Forms/MetadataMappingHandler.php
@@ -115,6 +115,17 @@
)
);
+ $delayed_enabled =
+ JobQueueGroup::singleton()
+ ->get( 'gwtoolsetUploadMetadataJob' )
+ ->delayedJobsEnabled();
+
+ if ( $delayed_enabled ) {
+ $job->params['jobReleaseTimestamp'] = strtotime(
+ '+' . Utils::sanitizeString(
Config::$metadata_job_delay )
+ );
+ }
+
$result = JobQueueGroup::singleton()->push( $job );
if ( $result ) {
--
To view, visit https://gerrit.wikimedia.org/r/100942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic984f52b4cddd7b04ca11d6af45e85a9b6c1d7ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits