diff --git a/code/common/checkinputs.q b/code/common/checkinputs.q index 4dae11ac7..b5bf6796a 100755 --- a/code/common/checkinputs.q +++ b/code/common/checkinputs.q @@ -219,8 +219,8 @@ checkjoin:{[dict;parameter]:checktype[107h;dict;parameter];}; checkpostback:{[dict;parameter] if[()~dict parameter;:dict]; - if[not `sync in key dict;'`$.schema.errors[`asyncpostback;`errormessage]] - if[not dict`sync;'`$.schema.errors[`asyncpostback;`errormessage]] + if[not `sync in key dict;'`$.schema.errors[`asyncpostback;`errormessage]]; + if[not dict`sync;'`$.schema.errors[`asyncpostback;`errormessage]]; :checkpostprocessing[dict;parameter]}; checktimeout:{[dict;parameter] diff --git a/code/processes/gateway.q b/code/processes/gateway.q index 6d2e04531..79d243f2b 100644 --- a/code/processes/gateway.q +++ b/code/processes/gateway.q @@ -112,10 +112,10 @@ results:(enlist 0Nj)!enlist(0Ni;(enlist `)!enlist(0Ni;(::);0b)) servers:([serverid:`u#`int$()]handle:`int$(); servertype:`symbol$(); inuse:`boolean$();active:`boolean$();querycount:`int$();lastquery:`timestamp$();usage:`timespan$();attributes:();disconnecttime:`timestamp$()) addserverattr:{[handle;servertype;attributes] `.gw.servers upsert (nextserverid[];handle;servertype;0b;1b;0i;0Np;0D;attributes;0Np)} addserver:addserverattr[;;()!()] -setserverstate:{[serverh;use] - $[use; - update inuse:use,lastquery:.proc.cp[],querycount+1i from `.gw.servers where handle in serverh; - update inuse:use,usage:usage+.proc.cp[] - lastquery from `.gw.servers where handle in serverh]} +setserverstate:{[serverh;usestate] + $[usestate; + update inuse:usestate,lastquery:.proc.cp[],querycount+1i from `.gw.servers where handle in serverh; + update inuse:usestate,usage:usage+.proc.cp[] - lastquery from `.gw.servers where handle in serverh]} setderegserverids:{[serverh] if[@[value;`.finspace.enabled;0b] and @[value;`.finspace.dereginprog;0b]; svrIDs:exec serverid from .gw.servers where not null handle, handle in serverh;