Hi everyone,
I’m trying to use integrant’s suspend/resume functionality. I want to be able to pass a list of keys to resume
to just resume those keys. But it seems that integrant is first halting all other keys. Am I reading the code correctly? And is there any way to avoid this behaviour?
The keys argument of resume
is designed to match the keys
argument of init
. So in other words, a halt!
then a init
should result in the same running keys as a suspend!
followed by a resume
.
What exactly are you trying to do? Maybe there’s another solution for it.
I have some parts of a system consuming messages from a queue. Is it possible to use suspend
and resume
somehow to stop and start just those processes that are reading from the queue? The problem is that I don’t want them to be running from the start - the processes should not start reading from the queue until they get a message from somewhere else.
Does that make sense?
A little. So to clarify: you don’t want the keys to be running when the config is initiated, only when it’s resumed?
Yes, that’s right
I think you need to put something else in place, as if I understand you correctly, that’s not what suspend/resume was designed for.
suspend!/resume is made to replace halt!/init when developing.
So semantically it has to produce the same thing, but suspend!/resume allows connections, threads and other temporary resources to be re-used.
OK, I see. That makes sense, I will find another way to do it. Thanks for your help!
np