Singleton worker?

Is it possible to create a single worker instance that either stays up forever, or a sequence of workers that start one after the other?

What I’m trying to do is have one worker listen to a websocket and publish a live datafeed to a KV store. I’ve tried hacking a few ways via durable objects, cron jobs etc… but nothing too seamless.

Any ideas?

1 Like