File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ public function __construct($config = 'mysql:')
45
45
throw new \LogicException ('The config must be either an array of options, a DSN string or null ' );
46
46
}
47
47
48
- $ this ->config = $ config ;
48
+ $ this ->config = array_replace_recursive ([
49
+ 'connection ' => [],
50
+ 'table_name ' => 'enqueue ' ,
51
+ 'polling_interval ' => 1000 ,
52
+ 'lazy ' => true ,
53
+ ], $ config );
49
54
}
50
55
51
56
/**
Original file line number Diff line number Diff line change @@ -193,4 +193,16 @@ public function createDataBaseTable()
193
193
194
194
$ sm ->createTable ($ table );
195
195
}
196
+
197
+ /**
198
+ * @param DbalDestination $queue
199
+ */
200
+ public function purgeQueue (DbalDestination $ queue )
201
+ {
202
+ $ this ->getDbalConnection ()->delete (
203
+ $ this ->getTableName (),
204
+ ['queue ' => $ queue ->getQueueName ()],
205
+ ['queue ' => Type::STRING ]
206
+ );
207
+ }
196
208
}
You can’t perform that action at this time.
0 commit comments