mirror of
https://github.com/arjunkomath/openclaw-railway-template.git
synced 2026-08-14 00:48:11 +00:00
Clean up
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
export function canServeGatewayRequest({
|
||||
configured,
|
||||
hasProcessHandle,
|
||||
starting,
|
||||
reachable,
|
||||
}) {
|
||||
export function canServeGatewayRequest({ configured, reachable }) {
|
||||
if (!configured) return false;
|
||||
return reachable;
|
||||
}
|
||||
@@ -16,8 +11,6 @@ export function describeGatewayHealth({
|
||||
}) {
|
||||
const serving = canServeGatewayRequest({
|
||||
configured,
|
||||
hasProcessHandle,
|
||||
starting,
|
||||
reachable,
|
||||
});
|
||||
return {
|
||||
|
||||
@@ -10,8 +10,6 @@ test("serves gateway requests when a detached gateway is reachable", () => {
|
||||
assert.equal(
|
||||
canServeGatewayRequest({
|
||||
configured: true,
|
||||
hasProcessHandle: false,
|
||||
starting: false,
|
||||
reachable: true,
|
||||
}),
|
||||
true,
|
||||
@@ -40,8 +38,6 @@ test("does not serve gateway requests while configured gateway is unreachable",
|
||||
assert.equal(
|
||||
canServeGatewayRequest({
|
||||
configured: true,
|
||||
hasProcessHandle: false,
|
||||
starting: false,
|
||||
reachable: false,
|
||||
}),
|
||||
false,
|
||||
|
||||
@@ -1444,8 +1444,6 @@ app.use(async (req, res) => {
|
||||
if (
|
||||
!canServeGatewayRequest({
|
||||
configured: true,
|
||||
hasProcessHandle: isGatewayReady(),
|
||||
starting: isGatewayStarting(),
|
||||
reachable: gatewayReachable,
|
||||
})
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user