fix: separate poller and middleware postgres listeners
This commit is contained in:
parent
5945f9d31b
commit
b98d73cd6e
4 changed files with 64 additions and 36 deletions
|
|
@ -151,7 +151,7 @@ function unpair (rec) {
|
|||
}
|
||||
|
||||
function reboot (rec) {
|
||||
return db.none('NOTIFY $1:name, $2', ['poller', JSON.stringify(
|
||||
return db.none('NOTIFY $1:name, $2', ['machineAction', JSON.stringify(
|
||||
{
|
||||
type: 'machineAction',
|
||||
action: 'reboot',
|
||||
|
|
@ -161,7 +161,7 @@ function reboot (rec) {
|
|||
}
|
||||
|
||||
function shutdown (rec) {
|
||||
return db.none('NOTIFY $1:name, $2', ['poller', JSON.stringify(
|
||||
return db.none('NOTIFY $1:name, $2', ['machineAction', JSON.stringify(
|
||||
{
|
||||
type: 'machineAction',
|
||||
action: 'shutdown',
|
||||
|
|
@ -171,7 +171,7 @@ function shutdown (rec) {
|
|||
}
|
||||
|
||||
function restartServices (rec) {
|
||||
return db.none('NOTIFY $1:name, $2', ['poller', JSON.stringify(
|
||||
return db.none('NOTIFY $1:name, $2', ['machineAction', JSON.stringify(
|
||||
{
|
||||
type: 'machineAction',
|
||||
action: 'restartServices',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue