dahlia/fedify

Blog example cannot be built because KV connection is listening indefinitely

Closed this issue · 0 comments

Building the blog example is broken because the process is kept open indefinitely so the build task never finishes. Reason for that is that a Deno KV instance is opened and a listener is attached eagerly. This will prevent the process from exiting.

The kv queue is eagerly listened through this call here:

this.#kv.listenQueue(handler);
which is ultimately kicked off eagerly in the constructor of the Federation class here: https://github.com/dahlia/fedify/blob/main/federation/middleware.ts#L197

Commenting this out makes the build task finish as expected.

Steps to reproduce

  1. Go into the examples blog folder: cd examples/blog
  2. Run deno task build -> Process never exists