Postgresql transaction problem
In the code below, I commented the commit, but it can still be written to the database. I hope to write to the database after the commit. I used mysql before, but it is not normal to migrate to Postgresql. Could you please tell me where do I do this? is it wrong? thank you very much for your help
```

                with db.manual_commit() as tx:
                    db.begin()
                    for b in range(curr_storage_hight, curr_storage_hight + 1000):
                        if b > end_block:
                            print("current wait new block")
                            sleep(20)
                            break
                        self.starttime = datetime.datetime.now()
                        print("Current check_his block scripthash key  %s" % b)
                        self.bnumber = b
                 
                        c =Currnumber.get_or_none(name="gradenumber")
                        if c ==None:
                            Currnumber.create(name="gradenumber", number=self.bnumber)
                        else:
                            Currnumber.update(number=self.bnumber).where(Currnumber.name == "gradenumber").execute()
                    # db.commit()
```