Hi Stuart,

I got it.

Well, maybe I was not clear enough. My idea, is that I will "build" the 
system which base in some configuration file.Maybe I need "invert" be 
approach, and not remove components, but create the system which "with 
right components" once (with base in a configuration file, in my case).

Édipo

On Wednesday, May 27, 2015 at 4:52:05 AM UTC-3, Stuart Sierra wrote:
>
> Hi Édipo,
>
> I'm not sure I understand the question. Why do you want to remove a 
> component from the system after it has been started?
>
> Systems are just records, which behave like maps, so `assoc` and `dissoc` 
> should work normally. But the process of starting a system creates copies 
> of components to satisfy dependency relationships, so if you `dissoc` a 
> component from the top-level system map it may still be present under other 
> components which depend on it.
>
> In general, the 'component' framework does not provide a way to modify 
> individual components in the system after it has been started. It's good 
> for starting everything at once and stopping everything at once.
>
> –S
>
>
> On Tuesday, May 26, 2015 at 4:25:50 PM UTC+1, Édipo Luis Féderle wrote:
>>
>> Hi everyone,
>>
>>
>> I am using componente framework 
>> <https://github.com/stuartsierra/component>, I have the follow system:
>>
>>
>> (def system
>>
>>   (let [config (get envs :dev)]
>>
>>     (component/system-map
>>
>>      :db (db-connection (get (get config :db) :host)                     
>>
>>                         (get (get config :db) :db-name)
>>
>>                         (get (get config :db) :port))
>>
>>      :http-server (s/new-http-server 8080)
>>
>>      :confs config
>>
>>      :receivers receivers)))
>>
>>
>> There is some way to remove some component after it start? I tried use 
>> disassoc, but without success. Any idea how to I can do this?
>>
>>
>> Thanks in advance for any help.
>>
>>
>> Édipo
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to