devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
50 stars 15 forks source link

Pause/Resume #29

Open peervm opened 7 years ago

peervm commented 7 years ago

Hi,

The pause/resume behaviour is not functioning as I expect. Can you confirm the behaviour please.

Assuming that all subscriptions are paused, and this logic was used; pyrfa.marketPriceResume(ric) pyrfa.dispatchEventQueue()

I am expecting only the resumed ric to return updates, whereas it actually returns updates for the entire subscribed universe.

Thanks, Peer


Python 3.6 PyRFA 8.1.0 Windows (Win Server 2012)

wiwat-tharateeraparb commented 7 years ago

Hi Peer,

You should get resumed updates for for that specific ric only. Maybe you need to call dispatchEventQueue() before calling pauseAll() to make sure that all updates are dispatched from event queue?

peervm commented 7 years ago

That is my current implementation, but I will experiment with calling dispatchEventQueue() before and after the pause to see what happens.

FYI, the reason I asked this question is that after a resuming a single ric, the dispatchEventQueue() returned ~150`000 updates and the call took almost 5minutes to return. This makes me believe that all of the subscribed universe of ~1000 rics was resumed rather than a single ric.

Thanks, Peer

wiwat-tharateeraparb commented 7 years ago

I have checked it our lab again. The marketPriceResume() acts as expected. I suspected that you didn't dispatch updates our from event queue right after calling pauseAll(). If you have 1000 subscription list, then it is most likely to receive some updates between last update dispatching and before calling pauseAll().