Error when using `sql-sqlite-node` with Effect Workflow library and handling Ctrl+C interruption
Based on the code sample at https://www.npmjs.com/package/@effect/workflow, I change the db to use sql-sqlite-node.
when I run the code and make a control+c, I receive an error:
Do you have any idea what is the problem?
import { SqliteClient } from "@effect/sql-sqlite-node"
...
SqliteClient.layer({
filename: "./db-workflow.sqlite",
transformQueryNames: String.camelToSnake,
transformResultNames: String.snakeToCamel
})
...import { SqliteClient } from "@effect/sql-sqlite-node"
...
SqliteClient.layer({
filename: "./db-workflow.sqlite",
transformQueryNames: String.camelToSnake,
transformResultNames: String.snakeToCamel
})
...when I run the code and make a control+c, I receive an error:
[17:07:58.027] INFO (#1): Listening on: ::1:34431
service: Runner
package: @effect/cluster
^C[17:07:59.062] ERROR (#1): Error calling unregister with shard manager
RpcClientError: Error in socket
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/@effect+rpc@0.69.1_@effect+platform@0.90.6_effect@3.17.9__effect@3.17.9/node_modules/@effect/rpc/dist/esm/RpcClient.js:567:14
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.9/node_modules/effect/dist/esm/internal/core-effect.js:558:37
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.9/node_modules/effect/dist/esm/internal/fiberRuntime.js:970:46 {
[cause]: SocketError: An error occurred during Open
at Socket.<anonymous> (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/@effect+platform-node-shared@0.49.0_@effect+cluster@0.48.2_@effect+platform@0.90.6_effect@3.1_tyzovtjkdhucr6nrb4o5ihfw2e/node_modules/@effect/platform-node-shared/dist/esm/NodeSocket.js:30:24)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
[cause]: AggregateError: An error has occurred
at internalConnectMultiple (node:net:1134:18)
at afterConnectMultiple (node:net:1715:7)
}
}[17:07:58.027] INFO (#1): Listening on: ::1:34431
service: Runner
package: @effect/cluster
^C[17:07:59.062] ERROR (#1): Error calling unregister with shard manager
RpcClientError: Error in socket
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/@effect+rpc@0.69.1_@effect+platform@0.90.6_effect@3.17.9__effect@3.17.9/node_modules/@effect/rpc/dist/esm/RpcClient.js:567:14
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.9/node_modules/effect/dist/esm/internal/core-effect.js:558:37
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.9/node_modules/effect/dist/esm/internal/fiberRuntime.js:970:46 {
[cause]: SocketError: An error occurred during Open
at Socket.<anonymous> (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/@effect+platform-node-shared@0.49.0_@effect+cluster@0.48.2_@effect+platform@0.90.6_effect@3.1_tyzovtjkdhucr6nrb4o5ihfw2e/node_modules/@effect/platform-node-shared/dist/esm/NodeSocket.js:30:24)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
[cause]: AggregateError: An error has occurred
at internalConnectMultiple (node:net:1134:18)
at afterConnectMultiple (node:net:1715:7)
}
}Do you have any idea what is the problem?
