Skip to content

Commit

Permalink
Merge pull request #20 from phips28/master
Browse files Browse the repository at this point in the history
added 'applicationName' to database config to see it in the postgres activity logs
  • Loading branch information
timgit authored Mar 17, 2017
2 parents 9779453 + d0124e3 commit 406bdca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Db extends EventEmitter {
host: poolConfig.host,
port: poolConfig.port,
database: poolConfig.database,
application_name: poolConfig.application_name || 'pgboss',
max: poolConfig.poolSize,
Promise
});
Expand All @@ -35,7 +36,8 @@ class Db extends EventEmitter {
password: auth[1],
host: params.hostname,
port: params.port,
database: params.pathname.split('/')[1]
database: params.pathname.split('/')[1],
application_name: params.application_name || 'pgboss'
};
}
}
Expand Down

0 comments on commit 406bdca

Please sign in to comment.