feat(clien): verbose
This commit is contained in:
parent
49e242d9ea
commit
f4cd489ea4
10
client.py
10
client.py
@ -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")
|
||||
|
16
operators.py
16
operators.py
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user