how to run automatically webservice list plugin?

samani

Member
hi.
i want to run leach data from other website through api and webservice in one of these 2 way:
1-when user load the page , the data automatically leach via webservice plugin and no need to click on the button for get data from other website.
2-even the user not load that page, fabrik get data automatically. i want sync my database automatically every 1 hour via webservice. because i want create fusion chart by that data and i have not to click on the leach data button.
how to do that?
tnx
 
At the moment, neither of those features exist, and would have to be developed as custom work.

1) might be relatively easy to implement, adding that feature to the existing list plugin. I could be wrong, but (and this is by way of a "note to self") I think it would be just a case of adding an 'onPreloadData' method to the list plugin, which calls the existing process() method to fetch the web service data and upsert it into the local table. And of course adding the option for it on the backend settings. Might also want to add a 'frequency' option, so it only runs the preload if it hasn't been done for X minutes ... although I'm not sure where we would store that information. Anyway ... maybe an hour or so to add that feature, couple of hours if adding the frequency (need to add a table to hold the state information).

2) this would require writing a cron plugin to do it. That was our original intention, when we wrote the list plugin, to add a companion cron plugin, but the specific client project we wrote this stuff for wound up not needing the cron plugin. The good news is that a lot of the code that does the actual web service handling is in it's own model, which we call from the list plugin. So that makes writing a cron plugin easier. But ... it's still probably a day's work to write and test a cron plugin.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top