ak_dev | kjackal: kjackal_: kjackal__ : what is the difference between relation_get and get_remote? | 11:44 |
---|---|---|
ak_dev | and likewise, between relation_set and set_remote ? | 11:44 |
kjackal_ | ak_dev: let me see what relation_set is doing | 11:45 |
ak_dev | kjackal_: yeah okay | 11:46 |
kjackal_ | ak_dev: seems the set/get_remote is used to send/recieve data to/from the other side. The relation_set seems to be setting relation info for the current unit. Did you see relation_set in an example? | 11:51 |
ak_dev | i saw relation_set in the docs here : https://jujucharms.com/docs/2.1/reference-charm-hooks, which says that the [name]-relation-changed will trigger only when settings are changed (I am assuming via relation_set) | 11:53 |
ak_dev | does set_remote/get_remote trigger [name]-relation-changed hook? | 11:54 |
kjackal_ | ak_dev: yes it does | 11:54 |
ak_dev | kjackal_: ah okay, and i can do set/get_remote multiple time too right? and it should change the data | 11:55 |
kjackal_ | correct | 11:55 |
ak_dev | kjackal_: cool, thanks ! I am going forward with the peer relation thing itself, stub suggested against using leadership layer for this use case | 11:56 |
kjackal_ | ok ak_dev, you know best | 11:56 |
ak_dev | kjackal_: just trying to learn, going forward with what you and others are suggesting here :-) | 11:58 |
ak_dev | kjackal_: sorry to disturb you again, but will the [name]-relation-joined trigger for each new unit added? (in case of peer relation) | 12:05 |
ak_dev | also, if I understand right, if the above happens, then in case of three units, [name]-relation-joined should be run twice on each unit right? | 12:06 |
kjackal_ | ak_dev: I think so, yes. Usualy you handle the join and changed hooks in the same method | 12:07 |
ak_dev | kjackal_: oh alright, thanks again :-) | 12:08 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!