Пример #1
0
 def delete(self):
     bdb.delete(BDB_ISSUE_COMMENT_CONTENT_KEY % self.id)
     n = store.execute("delete from issue_comments "
                       "where id=%s", (self.id,))
     if n:
         store.commit()
         mc.delete(MC_KEY_ISSUE_COMMENTS_COUNT % self.issue_id)
         return True
Пример #2
0
 def delete(self):
     bdb.delete(BDB_ISSUE_COMMENT_CONTENT_KEY % self.id)
     n = store.execute("delete from issue_comments "
                       "where id=%s", (self.id,))
     if n:
         store.commit()
         mc.delete(MC_KEY_ISSUE_COMMENTS_COUNT % self.issue_id)
         return True
Пример #3
0
 def delete(self):
     node = TicketNode.get_by_codereview(self)
     if node:
         node.delete()
     bdb.delete(BDB_TICKET_LINECOMMENT_CONTENT_KEY % self.id)
     n = store.execute("delete from codedouban_ticket_codereview "
                       "where id=%s", (self.id,))
     if n:
         store.commit()
         return True
Пример #4
0
 def delete(self):
     node = TicketNode.get_by_codereview(self)
     if node:
         node.delete()
     bdb.delete(BDB_TICKET_LINECOMMENT_CONTENT_KEY % self.id)
     n = store.execute(
         "delete from codedouban_ticket_codereview "
         "where id=%s", (self.id, ))
     if n:
         store.commit()
         return True
Пример #5
0
def main():
    ds = []
    rs = store.execute("select id, project_id, issue_id "
                       "from project_issues")
    for r in rs:
        id = r[0]
        project_id = r[1]
        issue_id = r[2]
        description = bdb.get(BDB_ISSUE_DESCRIPTION_KEY % id)
        bdb.delete(BDB_ISSUE_DESCRIPTION_KEY % id)
        ds.append([issue_id, description])

    for d in ds:
        issue_id = d[0]
        description = d[1]
        bdb.set(BDB_ISSUE_DESCRIPTION_KEY % issue_id, description)
Пример #6
0
 def after_delete(self):
     bdb.delete(BDB_TICKET_COMMENT_CONTENT_KEY % self.id)
     node = TicketNode.get_by_comment(self)
     if node:
         node.delete()
Пример #7
0
 def after_delete(self):
     bdb.delete(BDB_TICKET_COMMENT_CONTENT_KEY % self.id)
     node = TicketNode.get_by_comment(self)
     if node:
         node.delete()