How to access a feed's meta data, esp its interval?

One of the requirements of my Log to Rfeed process is the feed interval for the Rfeed id. I am using the phpFINA engine in with a 10 second feed interval, but rather than just assume it is 10s, because I remember how I set it, I would prefer to retrieve it from the engine’s meta data so that if I use Log to Rfeed with other feed intervals it uses the correct interval for each. If I use:


from within process_processlist.php, RedisBuffer appears to get the call, but I actually need the phpFINA engine to do so.
How do I do that? I should point out that my understanding of the $this construct is hazy, shallow and probably wrong.

Here is a command line from chaveiro to determine if the interval is correct. I don’t know PHP well enough to help with the other questions.

Display RAW feed data from PHP engines for debuging

Submitted by chaveiro on Mon, 27/07/2015 - 11:30

Thanks, Jon, that work as a command line, but I really need something that works within a php file, so that the Log to Rfeed function can check for itself and use the value as part of its operation. I could exec it, but that isn’t the way that other functions within emoncms do it, and I suspect there are good reasons for that.

Essentially there should be a way of directing the $meta=$this->feed->get_meta($feedid) to the specific get_meta function within the phpFINA.php script, and that is the part I don’t really understand. I would probably want a line to check from the feed id which engine owns it, and then call the relevant get_meta in that engine’s php script.

I eventually gave up trying to get feed_model.php, or phpFina.php to give me the interval for a feed, and ended up copying over the phpfina engine’s get_meta function into process_processlist.php so that I could get the metadata directly from the metafile itself. Worked first time, and I’ve been trying to get this for weeks!

Now Log to Rfeed can work correctly in multiple instances with feeds that have varying feed intervals.

If someone who knows better than I do the proper way to get the feed interval from within a function inside process_processlist.php, rather than the brute force method I just implemented, please let me know how to do it.