|
Post by fnllc on Sept 15, 2019 20:48:23 GMT
Is it possible to trigger a source adapter poll (calling the query method to get updated records from backend and save into Redis) using the REST API?
I have disabled automatic polling to reduce resource usage. I would like to only poll for changes when a change has been made on backend. I do not see an API endpoint for this. I see that I can ping user devices, but I need to poll first, then ping.
|
|
|
Post by Vladimir Musulainen on Sept 15, 2019 20:53:01 GMT
|
|
|
Post by fnllc on Sept 16, 2019 15:59:04 GMT
I'm using Resque and Async jobs. So, when a sync is triggered from device or push, it doesn't get the updated or new records on first sync, because the "query" is executed after. Maybe I'm doing something wrong. In the documentation, there is an example where a Ping is sent at the end of the "query" method (See: docs.tau-technologies.com/en/7.1/rhoconnect/push-backend-setup, Pushing Directly from a RhoConnect Source Adapter). However, how can trigger the "query" method from my backend using the Rhoconnect REST API?
|
|
|
Post by fnllc on Sept 17, 2019 18:45:04 GMT
I have setup the push notifications. They are working properly. However, I still have to send multiple push notifications (minimum 2) to update client from changes on server. When I don't use resque, then only one sync is enough. When using resque, the first sync loads the data from server into Rhoconnect/Redis. Then, on the second sync call, the changes from server are loaded into client.
This is why I would like to trigger a manual poll when there are changes on the server. Then, once manual poll is finished (changes are in RhoConnect/Redis) then I can call a push notification for clients to sync.
|
|