Merge branch 'elrond-sql-convert_video_data'
This commit is contained in:
commit
dc84dbee7f
@ -106,6 +106,19 @@ def convert_media_entries(mk_db):
|
|||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
|
|
||||||
|
def convert_video(mk_db):
|
||||||
|
session = Session()
|
||||||
|
|
||||||
|
for media in mk_db.MediaEntry.find(
|
||||||
|
{'media_type': 'mediagoblin.media_types.video'}).sort('created'):
|
||||||
|
media_data_row = VideoData(**media.media_data)
|
||||||
|
media_data_row.media_entry = obj_id_table[media._id]
|
||||||
|
session.add(media_data_row)
|
||||||
|
|
||||||
|
session.commit()
|
||||||
|
session.close()
|
||||||
|
|
||||||
|
|
||||||
def convert_media_tags(mk_db):
|
def convert_media_tags(mk_db):
|
||||||
session = Session()
|
session = Session()
|
||||||
session.autoflush = False
|
session.autoflush = False
|
||||||
@ -167,6 +180,8 @@ def run_conversion(config_name):
|
|||||||
Session.remove()
|
Session.remove()
|
||||||
convert_media_entries(mk_db)
|
convert_media_entries(mk_db)
|
||||||
Session.remove()
|
Session.remove()
|
||||||
|
convert_video(mk_db)
|
||||||
|
Session.remove()
|
||||||
convert_media_tags(mk_db)
|
convert_media_tags(mk_db)
|
||||||
Session.remove()
|
Session.remove()
|
||||||
convert_media_comments(mk_db)
|
convert_media_comments(mk_db)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user