Skip to content

Commit

Permalink
Get minion DSN from config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 18, 2016
1 parent 1fde2f7 commit 6d61005
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/MetaCPAN/Queue/Helper.pm
Expand Up @@ -13,6 +13,8 @@ has backend => (
builder => '_build_backend',
);

with 'MetaCPAN::Role::HasConfig';

# We could also use an in-memory SQLite db, but this gives us the option of not
# unlinking in order to debug the contents of the db, if we need to.

Expand All @@ -26,7 +28,7 @@ sub _build_backend {
}

load(Minion::Backend::Pg);
return { Pg => "postgresql:///minion_queue" };
return { Pg => $self->config->{minion_dsn} };
}

__PACKAGE__->meta->make_immutable;
Expand Down
1 change: 1 addition & 0 deletions metacpan_server.conf
@@ -1,5 +1,6 @@
git /usr/bin/git

minion_dsn = postgresql:///minion_queue
pod_html_x_codes = 0

<controller User::Turing>
Expand Down

0 comments on commit 6d61005

Please sign in to comment.