Skip to content

0.73.0

Choose a tag to compare

@dantownsend dantownsend released this 08 Apr 16:37
· 463 commits to master since this release

You can now specify extra nodes for a database. For example, if you have a read replica.

  DB = PostgresEngine(
      config={'database': 'main_db', 'host': 'prod.my_db.com'},
      extra_nodes={
          'read_replica_1': PostgresEngine(
              config={
                  'database': 'main_db',
                  'host': 'read_replica_1.my_db.com'
              }
          )
      }
  )

And can then run queries on these other nodes:

  >>> await MyTable.select().run(node="read_replica_1")

See PR 481. Thanks to @dashsatish for suggesting this feature.

Also, the targ library has been updated so it tells users about the --trace argument which can be used to get a full traceback when a CLI command fails.