File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ Yii2 Queue Extension Change Log
4
4
2.1.1 under development
5
5
-----------------------
6
6
7
- - no changes in this release.
8
-
7
+ - Enh #248 : Reduce roundtrips to beanstalk server when removing job (SamMousa)
9
8
10
9
2.1.0 May 24, 2018
11
10
------------------
Original file line number Diff line number Diff line change 8
8
namespace yii \queue \beanstalk ;
9
9
10
10
use Pheanstalk \Exception \ServerException ;
11
+ use Pheanstalk \Job ;
11
12
use Pheanstalk \Pheanstalk ;
12
13
use Pheanstalk \PheanstalkInterface ;
13
14
use yii \base \InvalidArgumentException ;
@@ -103,8 +104,7 @@ public function status($id)
103
104
public function remove ($ id )
104
105
{
105
106
try {
106
- $ job = $ this ->getPheanstalk ()->peek ($ id );
107
- $ this ->getPheanstalk ()->delete ($ job );
107
+ $ this ->getPheanstalk ()->delete (new Job ($ id , null ));
108
108
return true ;
109
109
} catch (ServerException $ e ) {
110
110
if (strpos ($ e ->getMessage (), 'NOT_FOUND ' ) === 0 ) {
You can’t perform that action at this time.
0 commit comments