Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 17f4a26

Browse files
committed
chore: fix serverless config (#1361)
1 parent e98e47f commit 17f4a26

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/counter-serverless/scripts/connect.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import type { Registry } from "../src/registry";
44
async function main() {
55
const client = createClient<Registry>("http://localhost:6420");
66

7-
const counter = client.counter.getOrCreate().connect();
7+
const counter = client.counter.getOrCreate();
88

9-
counter.on("newCount", (count: number) => console.log("Event:", count));
9+
// counter.on("newCount", (count: number) => console.log("Event:", count));
1010

1111
for (let i = 0; i < 5; i++) {
1212
const out = await counter.increment(5);
@@ -16,7 +16,7 @@ async function main() {
1616
}
1717

1818
await new Promise((resolve) => setTimeout(resolve, 10000));
19-
await counter.dispose();
19+
// await counter.dispose();
2020
}
2121

2222
main();

packages/next-js/src/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const toNextHandler = (
1111
const publicUrl =
1212
process.env.NEXT_PUBLIC_SITE_URL ??
1313
process.env.NEXT_PUBLIC_VERCEL_URL ??
14-
`http://127.0.0.1:${process.env.PORT ?? 8080}`;
14+
`http://127.0.0.1:${process.env.PORT ?? 3000}`;
1515
inputConfig.runnerKind = "serverless";
1616
inputConfig.runEngine = true;
1717
inputConfig.autoConfigureServerless = {

packages/rivetkit/src/registry/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ async function configureServerlessRunner(config: RunnerConfig): Promise<void> {
239239
headers: customConfig.headers || {},
240240
max_runners: customConfig.maxRunners ?? 100,
241241
min_runners: customConfig.minRunners ?? 0,
242-
request_lifespan: customConfig.requestLifespan ?? 15 * 60_000,
242+
request_lifespan: customConfig.requestLifespan ?? 15 * 60,
243243
runners_margin: customConfig.runnersMargin ?? 0,
244244
slots_per_runner:
245-
customConfig.slotsPerRunner ?? config.totalSlots ?? 10000,
245+
customConfig.slotsPerRunner ?? config.totalSlots ?? 1000,
246246
},
247247
};
248248

0 commit comments

Comments
 (0)