Fix query for name memory
This commit is contained in:
parent
bd3d7f4120
commit
f92405092d
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ def getFollowing(db=dbtools.dbHelper(), two=twitools.twObject(), firstrun=False)
|
||||||
def getNames(db = dbtools.dbHelper(), two = twitools.twObject()):
|
def getNames(db = dbtools.dbHelper(), two = twitools.twObject()):
|
||||||
for user in twitools.getNamesByIDs(list(set(list(db.getFollowing()) + list(db.getFollowers())))):
|
for user in twitools.getNamesByIDs(list(set(list(db.getFollowing()) + list(db.getFollowers())))):
|
||||||
if not db.matchNameID(user["name"], user["id"]):
|
if not db.matchNameID(user["name"], user["id"]):
|
||||||
db.executeQuery("UPDATE names SET `until` = %i WHERE `id` = '%s';" % (int(time.time()), str(user["id"])))
|
db.executeQuery("UPDATE names SET `until` = %i WHERE `id` = '%s' AND `until` = 0;" % (int(time.time()), str(user["id"])))
|
||||||
db.executeQuery("INSERT INTO names VALUES('%s', '%s', %i, 0)" % (str(user["id"]), str(user["name"]), int(time.time())))
|
db.executeQuery("INSERT INTO names VALUES('%s', '%s', %i, 0)" % (str(user["id"]), str(user["name"]), int(time.time())))
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue