Forgot to commit this
Cette révision appartient à :
Parent
d12ffb92ba
révision
5ab2688e78
|
@ -21,7 +21,7 @@ es = Elasticsearch()
|
||||||
pgconn = psycopg2.connect(dbparams)
|
pgconn = psycopg2.connect(dbparams)
|
||||||
|
|
||||||
cur = pgconn.cursor()
|
cur = pgconn.cursor()
|
||||||
cur.execute("""SELECT torrent_id, torrent_name, hidden, category, sub_category, status,
|
cur.execute("""SELECT torrent_id, torrent_name, description, hidden, category, sub_category, status,
|
||||||
torrent_hash, date, uploader, downloads, filesize, seeders, leechers, completed, language
|
torrent_hash, date, uploader, downloads, filesize, seeders, leechers, completed, language
|
||||||
FROM {torrent_tablename}
|
FROM {torrent_tablename}
|
||||||
WHERE deleted_at IS NULL""".format(torrent_tablename=torrent_tablename))
|
WHERE deleted_at IS NULL""".format(torrent_tablename=torrent_tablename))
|
||||||
|
@ -29,7 +29,7 @@ cur.execute("""SELECT torrent_id, torrent_name, hidden, category, sub_category,
|
||||||
fetches = cur.fetchmany(CHUNK_SIZE)
|
fetches = cur.fetchmany(CHUNK_SIZE)
|
||||||
while fetches:
|
while fetches:
|
||||||
actions = list()
|
actions = list()
|
||||||
for torrent_id, torrent_name, hidden, category, sub_category, status, torrent_hash, date, uploader, downloads, filesize, seeders, leechers, completed, language in fetches:
|
for torrent_id, torrent_name, description, hidden, category, sub_category, status, torrent_hash, date, uploader, downloads, filesize, seeders, leechers, completed, language in fetches:
|
||||||
doc = {
|
doc = {
|
||||||
'id': torrent_id,
|
'id': torrent_id,
|
||||||
'name': torrent_name.decode('utf-8'),
|
'name': torrent_name.decode('utf-8'),
|
||||||
|
@ -38,6 +38,7 @@ while fetches:
|
||||||
'status': status,
|
'status': status,
|
||||||
'hash': torrent_hash,
|
'hash': torrent_hash,
|
||||||
'hidden': hidden,
|
'hidden': hidden,
|
||||||
|
'description': description,
|
||||||
'date': date,
|
'date': date,
|
||||||
'uploader_id': uploader,
|
'uploader_id': uploader,
|
||||||
'downloads': downloads,
|
'downloads': downloads,
|
||||||
|
|
Référencer dans un nouveau ticket