Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
t = Task(type='resize', arguments=json.dumps({'new_width': width, 'url': url, 'bucket': self.bucket}))
db.session.commit()"Added the resize task to the DB")
except IntegrityError as integrityerror:
db.session.rollback()"Task is conflicting with another task in the DB")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment