Skip to content

Commit

Permalink
use collection factory, can extract db name from dsn
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Apr 3, 2018
1 parent 10ca7ae commit 07efdc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Scheduler/Store/YadmStoreResource.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Quartz\Scheduler\Store;

use Makasim\Yadm\CollectionFactory;
use Makasim\Yadm\Hydrator;
use Makasim\Yadm\PessimisticLock;
use Makasim\Yadm\Storage;
Expand Down Expand Up @@ -89,7 +90,9 @@ public function getClient()
*/
public function getCollection($name)
{
return $this->getClient()->selectCollection($this->options['dbName'], $name);
$factory = new CollectionFactory($this->getClient(), $this->options['uri']);

return $factory->create($name, $this->options['dbName']);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"require": {
"php": ">=5.6",
"ramsey/uuid": "^2|^3.5",
"makasim/yadm": "^0.3",
"makasim/yadm": "^0.3.12",
"g4/cron": "^0.1",
"symfony/event-dispatcher": "^3.4|^4"
},
Expand Down

0 comments on commit 07efdc2

Please sign in to comment.