diff options
author | Joar Wandborg <git@wandborg.com> | 2012-09-24 23:47:32 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-09-26 23:53:51 +0200 |
commit | 5354f954dc94aafd35bc037faad2412f73320d8c (patch) | |
tree | 6036d4e29bebb9ff5df362382baecb07c30e74b0 /mediagoblin/db/sql/models.py | |
parent | 20d01daed7f7b6684c81871efa8904855d85ad7b (diff) | |
download | mediagoblin-5354f954dc94aafd35bc037faad2412f73320d8c.tar.lz mediagoblin-5354f954dc94aafd35bc037faad2412f73320d8c.tar.xz mediagoblin-5354f954dc94aafd35bc037faad2412f73320d8c.zip |
Added support for http callbacks on processing
Sends an HTTP POST request back to an URL given on submission to the API
submit view.
Diffstat (limited to 'mediagoblin/db/sql/models.py')
-rw-r--r-- | mediagoblin/db/sql/models.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mediagoblin/db/sql/models.py b/mediagoblin/db/sql/models.py index ccf03f32..01694725 100644 --- a/mediagoblin/db/sql/models.py +++ b/mediagoblin/db/sql/models.py @@ -412,9 +412,24 @@ class CollectionItem(Base, CollectionItemMixin): return DictReadAttrProxy(self) +class ProcessingMetaData(Base): + __tablename__ = 'core__processing_metadata' + + id = Column(Integer, primary_key=True) + media_entry_id = Column(Integer, ForeignKey(MediaEntry.id), nullable=False, + index=True) + media_entry = relationship(MediaEntry, backref='processing_metadata') + callback_url = Column(Unicode) + + @property + def dict_view(self): + """A dict like view on this object""" + return DictReadAttrProxy(self) + + MODELS = [ User, MediaEntry, Tag, MediaTag, MediaComment, Collection, CollectionItem, MediaFile, FileKeynames, - MediaAttachmentFile] + MediaAttachmentFile, ProcessingMetaData] ###################################################### |