Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 27, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@effect/platform@0.93.5

Patch Changes

@effect/workflow@0.13.1

Patch Changes

  • #5821 2519056 Thanks @tim-smart! - add DurableQueue module

    A DurableQueue wraps a PersistedQueue, providing a way to wait for items
    to finish processing using a DurableDeferred.

    import { DurableQueue, Workflow } from "@effect/workflow"
    import { Effect, Schema } from "effect"
    
    // Define a DurableQueue that can be used to derive workers and offer items for
    // processing.
    const ApiQueue = DurableQueue.make({
      name: "ApiQueue",
      payload: {
        id: Schema.String
      },
      success: Schema.Void,
      error: Schema.Never,
      idempotencyKey(payload) {
        return payload.id
      }
    })
    
    const MyWorkflow = Workflow.make({
      name: "MyWorkflow",
      payload: {
        id: Schema.String
      },
      idempotencyKey: ({ id }) => id
    })
    
    const MyWorkflowLayer = MyWorkflow.toLayer(
      Effect.fn(function* () {
        // Add an item to the DurableQueue defined above.
        //
        // When the worker has finished processing the item, the workflow will
        // resume.
        //
        yield* DurableQueue.process(ApiQueue, { id: "api-call-1" })
    
        yield* Effect.log("Workflow succeeded!")
      })
    )
    
    // Define a worker layer that can process items from the DurableQueue.
    const ApiWorker = DurableQueue.worker(
      ApiQueue,
      Effect.fn(function* ({ id }) {
        yield* Effect.log(`Worker processing API call with id: ${id}`)
      }),
      { concurrency: 5 } // Process up to 5 items concurrently
    )
  • Updated dependencies [ebfbbd6]:

    • @effect/platform@0.93.5

@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Nov 27, 2025
@github-actions github-actions bot force-pushed the changeset-release/main branch from 01b694e to dee1528 Compare November 27, 2025 22:22
@github-actions github-actions bot force-pushed the changeset-release/main branch from dee1528 to 126fba6 Compare November 27, 2025 22:23
@github-actions github-actions bot requested a review from tim-smart as a code owner November 27, 2025 22:23
@tim-smart tim-smart merged commit 38f1272 into main Nov 27, 2025
@tim-smart tim-smart deleted the changeset-release/main branch November 27, 2025 22:25
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants