Skip to content

Commit 8a5ab4b

Browse files
stash core chagnes
1 parent ea24f6e commit 8a5ab4b

4 files changed

Lines changed: 553 additions & 2 deletions

File tree

examples/effect-worker-v2/src/jobs/basic-debounce.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export const debounceExample = Debounce.make({
5252
Effect.gen(function* () {
5353
const state = yield* ctx.state;
5454
const eventCount = yield* ctx.eventCount;
55+
const failChance = Math.random() < 0.5;
56+
if (failChance) {
57+
yield* Effect.fail("Debounce job randomly failed");
58+
}
5559
yield* Effect.tryPromise(() => fetch("http://localhost:3000/api/health"));
5660
// yield* Effect.fail("Debounce job failed");
5761
yield* Effect.log(

examples/effect-worker-v2/src/jobs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const { Jobs, JobsClient, registry } = createDurableJobs(
4242
},
4343
{
4444
tracker: {
45-
endpoint: "https://durable-effect-sync.backpine.workers.dev/sync",
45+
endpoint: "http://localhost:3000/sync",
4646
env: "dev",
4747
serviceKey: "my-service-key",
4848
},

packages/jobs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@durable-effect/jobs",
3-
"version": "0.0.1-next.2",
3+
"version": "0.0.1-next.3",
44
"type": "module",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)