Commit graph

20 commits

Author SHA1 Message Date
Petr Pchelko
a738dd647a Return deduplication to CategoryMembershipJob
After I86d26e494924eec24e7b1fb32c424ac1284be478 the job is
no longer instantiated on submission, only upon execution,
so deduplication flags and dedup info are no longer available
to kafka queue.

Bug: T204761
Depends-On: Ieb2604e65177736606aed351c6658b7df748dcee
Change-Id: Ibf95638a2ad218a83347db6749e2e7c9e8dbe0db
2019-10-29 06:10:22 +00:00
Petr Pchelko
ef51ecc6db jobqueue: Remove 'title' and 'namespace' from JobSpecification dedup info
After recent refactors of the jobs, the job params will contain
the title information if it's relevant. So, the getDeduplicationInfo
method of teh job class no longer includes page namespace/title
explicitly, but it was never removed from the JobSpecification
class.

See fc5d51f129 (I9c9d0726d4066bb0a).

Bug: T204761
Change-Id: Ieb2604e65177736606aed351c6658b7df748dcee
2019-10-02 18:08:26 +00:00
Fomafix
110a5877e9 Use [...] instead of array(...) in PHP comments and documentation
Change-Id: I0c83783051bf35fe785bc01644eeb2946902b6b2
2019-06-17 21:15:09 +02:00
Aaron Schulz
fc5d51f129 jobqueue: add GenericParameterJob and RunnableJob interface
Simplify the code of jobs that do not care about titles and removes
the direct Title dependency from JobQueue. Remove getTitle() from
IJobSpecification itself. Move all the Job::factory calls into a
single JobQueue::factoryJob() method.

Depends-on: Iee78f4baeca0c0b4d6db073f2fbcc56855114ab0
Change-Id: I9c9d0726d4066bb0aa937665847ad6042ade13ec
2019-04-08 11:05:23 -07:00
Aaron Schulz
9b4938c40d jobqueue: simplify the signature of Job::factory() and Job::__construct()
Remove the $title argument from these methods to simplify subclasses that
do not have a meaningful title to use. The Job::getTitle() method can be
overriden by subclasses to return something meaningful.

The old call signature is still supported for backwards compatibility.
This will automatically determine what getTitle() returns as before.

Use "Blankpage" as the "not applicable" title for jobs instead of one
that looks like some error occured.

Change-Id: I3d5bd012d9cef1e7daaccfb0d5d319552eb89fb6
2019-03-29 13:15:58 -07:00
Umherirrender
1ca06c64af Move interface IJobSpecification to own file
Change-Id: Iabb10f8473b2ef0f4aea2aaca0dad39745028ece
2019-02-04 21:04:12 +01:00
Umherirrender
130ec2523d Fix PhanTypeMismatchDeclaredParam
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff

Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
2018-07-07 00:34:30 +00:00
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Tim Starling
dc2948d76d A few doc comment fixups
* Remove some creation dates, they are not protected by GPL
* Remove duplicate @defgroup API
* Remove @ingroup from some @file doc comments on class files. It is not
  useful to list class files alongside classes in the doxygen module menu.
  Add @ingroup to some more class files that had @ingroup on their file,
  that was probably the author's intent.
* In PackedOverlayImageGallery, use the file comment as a class comment
* Don't put @defgroup and @file in the same comment. @defgroup makes the
  whole doc comment describe the group.
* Instead of putting AnsiTermColorer in two groups, use hierarchical
  groups.

Change-Id: If54f6e0b2bc1ea6de42045885cf836ee67b8e961
2017-12-04 11:11:52 +11:00
Timo Tijhof
3a2a707546 Clean up remaining get_class() uses
* get_class()        -> __CLASS__ (same as self::class)
* get_called_class() -> static::class
* get_class($this)   -> static::class

Change-Id: I1888a1897ecf4548a2e5a67a942e5c080dd7e3d3
2017-03-07 22:03:47 +00:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Aaron Schulz
e2826974c6 Automatically deduplicate root jobs on insertion
* This makes lazyPush() simple to use in more cases

Change-Id: I22e74485eaf3120e5669c5ee55dc7ab7310d7300
2015-06-03 20:58:20 +00:00
Aaron Schulz
22734b3c0f Let deduplicateRootJob() accept JobSpecification for consistency
Change-Id: I872c2af40028e918fe6d9a8cd32ac97c70bffdae
2015-05-23 12:49:44 -07:00
Aaron Schulz
c6ea60543b Removed duplicated jobs in triggerOpportunisticLinksUpdate()
* They get deduplicated on final insertion, but de-duplication them
  on initial insertion (EnqueueJob) to avoid any build-up there.

Change-Id: Ia06f2bdf59a7e57fddb22890aa0b39420c0bfa7d
2015-05-05 20:54:47 -07:00
Aaron Schulz
a2ea6116af Fixed some <code> tags for doxygen
Change-Id: I550b8760556e4916ee9b63ee244bbbcb4d926142
2015-04-29 06:01:59 +01:00
Aaron Schulz
a68e3c89a9 Avoid using local main page title in JobSpecification
* They may not work well on the wiki that runs the jobs

Bug: T92789
Change-Id: I496974b11bd865ede9dd6d2cd534e0abdd7fa3f7
2015-04-13 15:03:52 -07:00
Aaron Schulz
8e3721a2b9 Added EnqueueJob class that handles routing jobs to queues
Bug: T89308
Change-Id: Iadb34f24d8bbe94c0f9f119e530c0bbe1060df0a
2015-03-04 13:55:54 -08:00
Marius Hoch
64ca023ac3 Inprove the exception message in JobSpecification::validateParams
Change-Id: Ifcaa5e89e6b5dd4d89ca26203400082bff6fd85a
2014-03-18 16:34:31 +01:00
Aaron Schulz
9ffd4f085d Renamed /job to /jobqueue
Change-Id: I4c8a2b42140630838867c77a70d45ba14b5d95e2
2014-03-14 13:42:04 -07:00
Renamed from includes/job/JobSpecification.php (Browse further)