feat(clien): verbose

This commit is contained in:
Swann Martinez 2019-05-02 18:23:35 +02:00
parent 49e242d9ea
commit f4cd489ea4
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
2 changed files with 8 additions and 18 deletions

View File

@ -475,6 +475,8 @@ def rcf_client_worker(ctx,store, pipe, serial_product, serial_feed, stop_event):
def serial_worker(product, feed):
logger.info("serial thread launched")
while True:
command,key,value = feed.get()
@ -489,11 +491,13 @@ def serial_worker(product, feed):
if value:
helpers.load(key, value)
logger.info("serial thread stopped")
def watchdog_worker(feed,interval, stop_event):
import bpy
global stop
logger.info("watchdog thread launched with {} sec of interval".format(interval))
while not stop_event.is_set():
for datatype in helpers.SUPPORTED_TYPES:
@ -504,3 +508,5 @@ def watchdog_worker(feed,interval, stop_event):
feed.put(('DUMP',key,None))
time.sleep(interval)
logger.info("watchdog thread stopped")

View File

@ -134,30 +134,14 @@ def default_tick():
return 1
def sync():
global client_instance
if client_instance:
for datatype in SUPPORTED_TYPES:
for item in getattr(bpy.data, helpers.CORRESPONDANCE[datatype]):
if item.id == 'None':
item.id = bpy.context.scene.session_settings.username
key = "{}/{}".format(datatype, item.name)
client_instance.add(key)
return .2
def register_ticks():
# REGISTER Updaters
# bpy.app.timers.register(sync)
bpy.app.timers.register(default_tick)
pass
def unregister_ticks():
# REGISTER Updaters
# bpy.app.timers.unregister(sync)
bpy.app.timers.unregister(default_tick)
pass