Re: [Twisted-Python] Question about using the adbapi

2011-05-10 Thread Albert Brandl
On Mon, May 09, 2011 at 02:15:04PM +0300, Pandelis Theodosiou wrote: > a) keep the last (longitude, latitude) pair for every receiver stored > in your script, too, besides the db. When a new pair of values > arrives, compare it with the current and only if it is different, send > the "INSERT" q

Re: [Twisted-Python] Question about using the adbapi

2011-05-10 Thread Albert Brandl
On Mon, May 09, 2011 at 11:03:12AM -, exar...@twistedmatrix.com wrote: > > d.addCallback(f, x, y) will result in f(resultOfD, x, y) Cool - no need to wrap the method call :-). The documentation for runQuery does not mention this feature, though: "Returns a Deferred which will fire the return

Re: [Twisted-Python] Question about using the adbapi

2011-05-09 Thread Pandelis Theodosiou
I see 2 other options: a) keep the last (longitude, latitude) pair for every receiver stored in your script, too, besides the db. When a new pair of values arrives, compare it with the current and only if it is different, send the "INSERT" query to the database. b) When a new pair of values arriv

Re: [Twisted-Python] Question about using the adbapi

2011-05-09 Thread exarkun
On 10:50 am, albert.bra...@weiermayer.com wrote: Hi! In the application I'm currently working on, we gather data from different sources and store them in a database, but only if the values have changed. One example is GPS information. We don't want to store hundreds of identical values that are

[Twisted-Python] Question about using the adbapi

2011-05-09 Thread Albert Brandl
Hi! In the application I'm currently working on, we gather data from different sources and store them in a database, but only if the values have changed. One example is GPS information. We don't want to store hundreds of identical values that are sent by the receiver, so we have to compare the