[Freeswitch-users] freeswitch fetching old records from sqlite

Aqs Younas aqsyounas at gmail.com
Wed Dec 14 16:22:25 MSK 2016


1) FreeSWITCH Version 1.6.9+git~20160613T181044Z~d574870720~64bit (git
d574870 2016-06-13 18:10:44Z 64bit)
2) No, I had not tried Lua yet but would give Lua a try and reply back with
results here
3) We are not using closures in code.
4) We get updated results through command line

Thank you for your time.

On 14 December 2016 at 11:14, Anthony Minessale <anthony.minessale at gmail.com
> wrote:

> What version of FS are you using?
> Does the same thing happen if you use LUA?  Maybe you can try a LUA
> example script to rule out an issue in JS.
> Does your code use any closures that may be causing the appearance of
> cached data?
> What about the sqlite command line tool?
>
>
>
>
> On Tue, Dec 13, 2016 at 1:56 PM, Aqs Younas <aqsyounas at gmail.com> wrote:
>
>> I should have provided more info.
>> Yes, this is a separate SQLite database being shared with FreeSWITCH.
>> Below is the javascript code snippet accessing database and querying the
>> records.
>>
>> var coreDbFile = "/opt/db/db.db"  // This is a sparate database then
>> freeswitch core database having custome tables only.
>> var db = new CoreDB(coreDbFile);
>> sql = "SELECT * FROM pool_campaigns_view WHERE pool_id = '" + 65 + "'";
>> db.prepare(sql);
>> while(db.next()) {
>> hash = db.fetch();
>> console_log("info", "Campaign ID: " + hash['campaign_id'] + ", Weight: "
>> + hash['weight']);
>> }
>> Sorry if there was something inappropriate in previous email and also not
>> clear what type of logs i should provide for this.
>>
>> On 13 December 2016 at 23:58, Anthony Minessale <
>> anthony.minessale at gmail.com> wrote:
>>
>>> Which data do you mean exactly?
>>>
>>> You said you use sqlite but its a different db than FS core.  So is this
>>> extra sqlite db being shared with FS?  How is FS accessing it.
>>> Its not really clear enough of an explanation to understand fully.
>>>
>>>
>>> On Tue, Dec 13, 2016 at 12:46 PM, Aqs Younas <aqsyounas at gmail.com>
>>> wrote:
>>>
>>>> Thanks for replying. We are not caching data it is just a simple select
>>>> query and logging in the console.
>>>>
>>>> On 13 December 2016 at 23:39, Michael Jerris <mike at jerris.com> wrote:
>>>>
>>>>> I can’t think of anyplace we would be caching data unless its
>>>>> somewhere in your js code that you are caching results.
>>>>>
>>>>>
>>>>> > On Dec 13, 2016, at 1:35 PM, Aqs Younas <aqsyounas at gmail.com> wrote:
>>>>> >
>>>>> > Hi,
>>>>> > We are using SQLite(separate database than core) with javascript and
>>>>> have observed a bizarre issue. Freeswitch query (Select) shows old records
>>>>> whereas data was changed a few minutes before.
>>>>> >
>>>>> > Sometimes updated data reflects back in FreeSWITCH after several
>>>>> minutes.  Whereas in PHPadmin I see updated data for the query.
>>>>> > I have asked the question on IRC where they advised me to change the
>>>>> database.
>>>>> >
>>>>> > Is there any workaround for this? Does freeswich caches data from
>>>>> sqlite?
>>>>> >
>>>>> > Sorry for asking again, we have a system in production doing some
>>>>> sqlite select queries, changing database would be the last option.
>>>>> >
>>>>> > Best,
>>>>> > Aqs Younas
>>>>>
>>>>>
>>>>> ____________________________________________________________
>>>>> _____________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>> switch-users
>>>>> http://www.freeswitch.org
>>>>
>>>>
>>>>
>>>> ____________________________________________________________
>>>> _____________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>> switch-users
>>>> http://www.freeswitch.org
>>>>
>>>
>>>
>>>
>>> --
>>> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>>>
>>>http://freeswitch.org/http://cluecon.com/>>> http://twitter.com/FreeSWITCH
>>> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
>>> <http://freeswitch.org/g+>*
>>>
>>> ClueCon Weekly Development Call
>>> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900 <(919)%20386-9900>
>>>
>>> https://www.youtube.com/watch?v=9XXgW34t40s
>>> https://www.youtube.com/watch?v=NLaDpGQuZDA
>>>
>>> ____________________________________________________________
>>> _____________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>
>http://freeswitch.org/http://cluecon.com/> http://twitter.com/FreeSWITCH
> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
> <http://freeswitch.org/g+>*
>
> ClueCon Weekly Development Call
> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900 <(919)%20386-9900>
>
> https://www.youtube.com/watch?v=9XXgW34t40s
> https://www.youtube.com/watch?v=NLaDpGQuZDA
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161214/cd969ea2/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list