> Trying to get subscriptions working with docker containers and in certain > situation > I need to override the place holder variable bisque_uwsgi_addr when > a specific environement VARIABLE is set. However, I never see it > overridden? > > > > > Any help appreciated. > > > $ env | fgrep BISQUE > BISQUE_FASTROUTER_KEYS=bisque > BISQUE_UWSGI_ADDR=10.140.65.108:3033 > ... > > [uwsgi] > .... > > > fastrouter_keys = $(BISQUE_FASTROUTER_KEYS) > fastrouter_ip = $(FASTROUTER_PORT_3017_TCP_ADDR) > fastrouter_port = 3017 > > bisque_uwsgi_addr = %(socket) > if-env= BISQUE_UWSGI_ADDR > bisque_uwsgi_addr = $(BISQUE_UWSGI_ADDR) > endif = > > # Subscribe this instance to a fastrouter > #subscribe-to=%(fastrouter_ip):%(fastrouter_port):%(fastrouter_keys) > for-readline = /bisque/config/fastkeys > subscribe2= > server=%(fastrouter_ip):%(fastrouter_port),key=%(_),addr=%(bisque_uwsgi_addr) > endfor = > > ===================================== > > > On the fastrouter I see the internal node being sent .. > > > [uwsgi-subscription for pid 5] bisque => new node: 172.17.0.34:3033 > > > If I change the config to read . > #bisque_uwsgi_addr = %(socket) > #if-env= BISQUE_UWSGI_ADDR > bisque_uwsgi_addr = $(BISQUE_UWSGI_ADDR) > #endif = > > Then I see > [uwsgi-subscription for pid 5] bisque => new node: 10.140.65.108:3033 > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
The if-* options are "immediate" so what is set into them is evaluated before the rest. For "readability purpose" i suggest: if-env = FOOBAR ops = $(FOOBAR) endif = if-not-env = FOOBAR ops = 127.0.0.1:4040 endif = -- Roberto De Ioris http://unbit.com _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
