fix broken import_to_es.py

This commit is contained in:
nyaadev 2017-09-17 02:54:09 +02:00
parent c5d705210d
commit 1bc21bc599
1 changed files with 25 additions and 25 deletions

View File

@ -98,15 +98,15 @@ FLAVORS = [
with app.app_context():
master_status = db.engine.execute('SHOW MASTER STATUS;').fetchone()
position_json = {
position_json = {
'log_file': master_status[0],
'log_pos': master_status[1]
}
}
print('Save the following in the file configured in your ES sync config JSON:')
print(json.dumps(position_json))
print('Save the following in the file configured in your ES sync config JSON:')
print(json.dumps(position_json))
for flavor, torrent_class in FLAVORS:
for flavor, torrent_class in FLAVORS:
print('Importing torrents for index', flavor, 'from', torrent_class)
bar = progressbar.ProgressBar(
maxval=torrent_class.query.count(),