* Remove ILoadBalancer from UserEditCountInitJob constructor,
since it is not a parameter and not a Job property.
It is not needed during Job construction.
* Use ConvertibleTimestamp instead of MWTimestamp since no
MW-specific methods or behaviours are needed here.
* I don't know if UserEditCountInitJob is always safe to de-duplicate,
but this should be decided in the Job class, and is not the
responsibility of calling code that creates/queues a job.
I don't know for sure why this is publicly part of JobSpecification,
but I guess it is there for internal use when serialising jobs,
not for external use in the way it was used here.
I'm assuming for now that its use means it is safe and I moved it to the
UserEditCountInitJob class. If this is not the case and de-dupability is
actually dependent on the parameters, then that logic should reside
in the UserEditCountInitJob constructor.
* Document for which internal use clearUserEditCache() is public.
This way during refactoring the method can be easily found and
made private if that caller is no longer needed.
* Remove needless Job::factory() indirection in the
UserEditCountInitJob test suite. This added overhead that is not
part of the test's purpose, and also risks making the test break
because Job::factory() allows types to be mapped to different
implementations. But, this test suite is meant to cover the
UserEditCountInitJob class implementation specifically.
Change-Id: I6fef4d297b1c0169f95906822e30b4addab7eaf4
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)
My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.
Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
Autopromote makes a DB call to fetch user edit count when checking edit count requirements. We can skip this call if requirement is set to 0 or invalid (less than 0).
Bug: T157718
Change-Id: I7bcfa6e7e4991fe7b48bef84ad24621564261abc