Skip to content

Commit e4baca4

Browse files
committed
Functions added to gateway to call orchestator to scale up/down
1 parent bade307 commit e4baca4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

code/processes/gateway.q

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,18 @@ addserversfromconnectiontable[.servers.CONNECTIONS]
535535
// Join active .gw.servers to .servers.SERVERS table
536536
activeservers:{lj[select from .gw.servers where active;`handle xcol `w xkey .servers.SERVERS]}
537537

538+
/function to tell orchestrator to scale up
539+
scaleup:{[procname]
540+
handle:first exec w from .servers.SERVERS where proctype=`orchestrator;
541+
neg[handle](`.orch.scaleup;procname);
542+
}
543+
544+
/function to tell orchestrator to scale down
545+
scaledown:{[procname]
546+
handle:first exec w from .servers.SERVERS where proctype=`orchestrator;
547+
neg[handle](`.orch.scaledown;procname);
548+
}
549+
538550
\d .
539551

540552
// functions called by end-of-day processes

0 commit comments

Comments
 (0)