Twitter: Markov used our "need to create our own db object" logic and then improved it.
most importantly, don't clobber the first thread's db instances
This commit is contained in:
parent
5e8e93beba
commit
c55852129a
@ -299,9 +299,8 @@ class Twitter(Module):
|
|||||||
# need to create our own db object, since this is likely going
|
# need to create our own db object, since this is likely going
|
||||||
# to be called in a new thread
|
# to be called in a new thread
|
||||||
dbfile = self.config.get('dr.botzo', 'database')
|
dbfile = self.config.get('dr.botzo', 'database')
|
||||||
self.conn = sqlite3.connect(dbfile)
|
db = sqlite3.connect(dbfile)
|
||||||
self.conn.row_factory = sqlite3.Row
|
db.row_factory = sqlite3.Row
|
||||||
db = self.conn
|
|
||||||
query = 'SELECT since_id FROM twitter_settings'
|
query = 'SELECT since_id FROM twitter_settings'
|
||||||
cursor = db.execute(query)
|
cursor = db.execute(query)
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user