pickle test 1 from intern
This commit is contained in:
1 parent
4dd9a73cbb
commit
d809a109e4
2 files changed
-40
No files matched your search
@@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
import redis
|
|
||||||
import json
|
|
||||||
from config import *
|
|
||||||
|
|
||||||
####################################################
|
|
||||||
### Redis Functions
|
|
||||||
####################################################
|
|
||||||
if enable_redis:
|
|
||||||
r = redis.Redis(host=bind_ip, port=redis_port)
|
|
||||||
|
|
||||||
def update_redis(data):
|
|
||||||
# push data to redis
|
|
||||||
# Publish to the Redis channel that the WS server is listening on
|
|
||||||
r.publish('temp_hum', json.dumps(data))
|
|
||||||
if debug_output:
|
|
||||||
print("=== Stats Redis Update ===")
|
|
||||||
print(json.dumps(data, indent=2))
|
|
||||||
return True
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
import redis
|
|
||||||
import json
|
|
||||||
from config import *
|
|
||||||
|
|
||||||
####################################################
|
|
||||||
### Redis Functions
|
|
||||||
####################################################
|
|
||||||
if enable_redis:
|
|
||||||
r = redis.Redis(host=bind_ip, port=redis_port)
|
|
||||||
|
|
||||||
def update_redis(data):
|
|
||||||
# push data to redis
|
|
||||||
# Publish to the Redis channel that the WS server is listening on
|
|
||||||
r.publish('temp_hum', json.dumps(data))
|
|
||||||
if debug_output:
|
|
||||||
print("=== Stats Redis Update ===")
|
|
||||||
print(json.dumps(data, indent=2))
|
|
||||||
return True
|
|
||||||
|
|
||||||
Reference in new issue
Block a user