1. Christopher Grebs
  2. lodgeit-main
  3. Issues
Issue #1 open

LodgeIt hangs when replying private pastes

created an issue

To reproduce:

  1. create a private paste

  2. try to write a paste replying to it

In debug mode is a loop with this query:

2010-11-30 16:23:37,374 INFO sqlalchemy.engine.base.Engine.0x...5650 ('NVZbzntwttWOrZy9adAa',) 2010-11-30 16:23:37,376 INFO

sqlalchemy.engine.base.Engine.0x...5650 UPDATE pastes SET private_id=? WHERE pastes.paste_id = ? 2010-11-30 16:23:37,376 INFO

sqlalchemy.engine.base.Engine.0x...5650 ('ZnqmvnfGLt5DIUmLG9g4', 4) 2010-11-30 16:23:37,377 INFO

sqlalchemy.engine.base.Engine.0x...5650 SELECT pastes.paste_id AS pastes_paste_id, pastes.code AS pastes_code, pastes.parent_id AS pastes_parent_id, pastes.pub_date AS pastes_pub_date, pastes.language AS pastes_language, pastes.user_hash AS pastes_user_hash, pastes.handled AS pastes_handled, pastes.private_id AS pastes_private_id FROM pastes WHERE pastes.private_id = ? LIMIT 1 OFFSET 0

Comments (8)

  1. Anonymous

    Here's the fix for you guys. In lodgeit/models.py, find

                while 1:
                    self.private_id = generate_paste_hash()
                    paste = Paste.query.filter(Paste.private_id ==
                    if paste is None:

    And replace with

                while 1:
                    private_id = generate_paste_hash()
                    paste = Paste.query.filter(Paste.private_id ==
                    if paste is None:
                        self.private_id = private_id
  2. Anonymous

    Confirmed that Anonymous' fix does work for me as well. This was bringing down lodgeit pretty frequently for us. Thanks for the fix!

  3. Log in to comment