[Freeswitch-users] freeswitch fetching old records from sqlite

Aqs Younas aqsyounas at gmail.com
Tue Dec 13 22:56:54 MSK 2016


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/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/b587d81e/attachment.html 


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