if ( $cpIndex > 0 ) {
if ( $allowHeaders ) {
- $expires = time() + ChronologyProtector::POSITION_TTL;
+ $now = time();
+ $expires = $now + ChronologyProtector::POSITION_COOKIE_TTL;
$options = [ 'prefix' => '' ];
- $request->response()->setCookie( 'cpPosIndex', $cpIndex, $expires, $options );
+ $value = LBFactory::makeCookieValueFromCPIndex( $cpIndex, $now ); // T190082
+ $request->response()->setCookie( 'cpPosIndex', $value, $expires, $options );
}
if ( $strategy === 'cookie+url' ) {
* @param LoggerInterface $runJobsLogger
*/
private function triggerSyncJobs( $n, LoggerInterface $runJobsLogger ) {
- $runner = new JobRunner( $runJobsLogger );
- $runner->run( [ 'maxJobs' => $n ] );
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
+ $old = $trxProfiler->setSilenced( true );
+ try {
+ $runner = new JobRunner( $runJobsLogger );
+ $runner->run( [ 'maxJobs' => $n ] );
+ } finally {
+ $trxProfiler->setSilenced( $old );
+ }
}
/**