protected function doBatchPush( array $jobs, $flags ) {
$dbw = $this->getMasterDB();
- $that = $this;
$method = __METHOD__;
$dbw->onTransactionIdle(
- function () use ( $dbw, $that, $jobs, $flags, $method ) {
- $that->doBatchPushInternal( $dbw, $jobs, $flags, $method );
+ function () use ( $dbw, $jobs, $flags, $method ) {
+ $this->doBatchPushInternal( $dbw, $jobs, $flags, $method );
}
);
}
return new ArrayIterator( array() );
}
- $that = $this;
return new MappedIterator(
$unclaimed,
- function ( $value ) use ( $that ) {
- $that->jobFromSpecInternal( $value );
+ function ( $value ) {
+ $this->jobFromSpecInternal( $value );
}
);
}
return new ArrayIterator( array() );
}
- $that = $this;
return new MappedIterator(
$claimed,
- function ( $value ) use ( $that ) {
- $that->jobFromSpecInternal( $value );
+ function ( $value ) {
+ $this->jobFromSpecInternal( $value );
}
);
}
* @return MappedIterator
*/
protected function getJobIterator( RedisConnRef $conn, array $uids ) {
- $that = $this;
-
return new MappedIterator(
$uids,
- function ( $uid ) use ( $that, $conn ) {
- return $that->getJobFromUidInternal( $uid, $conn );
+ function ( $uid ) use ( $conn ) {
+ return $this->getJobFromUidInternal( $uid, $conn );
},
array( 'accept' => function ( $job ) {
return is_object( $job );