Merge branch 'master' into dist/eole/2.6.2/master

This commit is contained in:
Philippe Caseiro 2018-05-14 22:56:39 +02:00
commit 9acd24cf19
2 changed files with 14 additions and 0 deletions

8
creolefuncs/redis.py Normal file
View File

@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
#
# just add 2 numbers ...
#
def add(num1, num2):
return str(int(num1) + int(num2)).decode("utf-8")

View File

@ -7,6 +7,7 @@
<service servicelist="svredis">redis-server</service> <service servicelist="svredis">redis-server</service>
<service_access service='redis-server'> <service_access service='redis-server'>
<port service_accesslist='saRedis' protocol='tcp' port_type='SymLinkOption'>redisPort</port> <port service_accesslist='saRedis' protocol='tcp' port_type='SymLinkOption'>redisPort</port>
<port service_accesslist='saRedis' protocol='tcp' port_type='SymLinkOption'>redisClPort</port>
<tcpwrapper>redis-server</tcpwrapper> <tcpwrapper>redis-server</tcpwrapper>
</service_access> </service_access>
<service_restriction service='redis-server'> <service_restriction service='redis-server'>
@ -26,6 +27,7 @@
<variable name='redisPort' type='string' description="Port d'écoute du service Redis"> <variable name='redisPort' type='string' description="Port d'écoute du service Redis">
<value>6379</value> <value>6379</value>
</variable> </variable>
<variable name='redisClPort' type='string' description="Port d'écoute du service Cluster Redis"/>
<variable name='redisMaxMemory' type='number' description="Quantité de mémoire utilisable par Redis en Mo"> <variable name='redisMaxMemory' type='number' description="Quantité de mémoire utilisable par Redis en Mo">
<value>512</value> <value>512</value>
</variable> </variable>
@ -106,6 +108,10 @@
<check name="valid_enum" target="redisMemoryPolicy"> <check name="valid_enum" target="redisMemoryPolicy">
<param>['noeviction', 'allkeys-lru','volatile-lru','volatile-random', 'allkeys-random','volatile-ttl']</param> <param>['noeviction', 'allkeys-lru','volatile-lru','volatile-random', 'allkeys-random','volatile-ttl']</param>
</check> </check>
<fill name='add' target='redisClPort'>
<param type='eole' name='num1'>redisPort</param>
<param name='num2'>10000</param>
</fill>
</constraints> </constraints>
<help> <help>
<variable name='activer_redis'>Activer le service de cache Redis</variable> <variable name='activer_redis'>Activer le service de cache Redis</variable>