Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Recipes

Carlos Pascual edited this page Apr 18, 2018 · 9 revisions

Delay or Disable Tango Events in Taurus

(stolen from an internal doc from Sergi Rubio)

Warning: this may break other things

GUI's subscribing to hundred of events may have an slow startup It has been partially solved in Tango > 9.2.6, anyway you may try this recipe to start the GUI in polling mode and subscribe events later.

At the beginning of your __main__ method:

from taurus.qt.qtcore.util.emitter import DelayedSubscriber
 
print('Disabling events '+'<'*40)
print(type(options.no_tango_events),options.no_tango_events)
taurus.Manager().changeDefaultPollingPeriod(9000)
taurus.Factory('tango').set_tango_subscribe_enabled(0)

To reenable events and start Delayed subscription

print('Reenabling events '+'<'*40)
subscriber = DelayedSubscriber('tango',parent=app,
                                sleep=10e3,pause=5)
Clone this wiki locally