From 939d57a022daa8f1f08dcfd111385225ca6030f6 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Tue, 25 Sep 2012 01:06:25 +0200 Subject: HTTP callback fixes - Added HTTPError catching around the callback request, to not mark the entry as failed, just log the exception. - Fixed bug where I forgot to actually fetch the entry before passing it to json_processing_callback. - Changed __main__ migration #6 to create the ProcessingMetaData table as it is currently, to prevent possible breakage if a siteadmin is lagging behind with his db migrations and more than one migration wants to fix stuff with the ProcessingMetaData table. --- mediagoblin/db/sql/migrations.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mediagoblin/db/sql/migrations.py') diff --git a/mediagoblin/db/sql/migrations.py b/mediagoblin/db/sql/migrations.py index 416c076b..1d822cd9 100644 --- a/mediagoblin/db/sql/migrations.py +++ b/mediagoblin/db/sql/migrations.py @@ -106,5 +106,13 @@ def add_mediaentry_collected(db_conn): @RegisterMigration(6, MIGRATIONS) def create_processing_metadata_table(db): - ProcessingMetaData.__table__.create(db.bind) + metadata = MetaData(bind=db.bind) + + metadata_table = Table('core__processing_metadata', metadata, + Column('id', Integer, primary_key=True), + Column('media_entry_id', Integer, ForeignKey(MediaEntry.id), + nullable=False, index=True), + Column('callback_url', Unicode)) + + metadata_table.create() db.commit() -- cgit v1.2.3