Skip to content

Commit 5d785ca

Browse files
committed
fix
1 parent 783631b commit 5d785ca

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: pkg/dbal/DbalConnectionFactory.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ public function __construct($config = 'mysql:')
4545
throw new \LogicException('The config must be either an array of options, a DSN string or null');
4646
}
4747

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);
4954
}
5055

5156
/**

Diff for: pkg/dbal/DbalContext.php

+12
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,16 @@ public function createDataBaseTable()
193193

194194
$sm->createTable($table);
195195
}
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+
}
196208
}

0 commit comments

Comments
 (0)