changeset 483:e814c98ef07a

psql: fix `max_items` setting when creating a node
author Goffi <goffi@goffi.org>
date Fri, 23 Sep 2022 18:04:50 +0200
parents 8bbaa089cb10
children 70eddf92bf51
files sat_pubsub/pgsql_storage.py
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/pgsql_storage.py	Tue Sep 06 11:33:34 2022 +0200
+++ b/sat_pubsub/pgsql_storage.py	Fri Sep 23 18:04:50 2022 +0200
@@ -286,29 +286,31 @@
             cursor.execute("""INSERT INTO nodes
                               (node,
                                node_type,
+                               access_model,
                                persist_items,
                                deliver_payloads,
-                               send_last_published_item,
-                               access_model,
-                               publish_model,
+                               max_items,
                                overwrite_policy,
                                serial_ids,
                                consistent_publisher,
                                fts_language,
+                               send_last_published_item,
+                               publish_model,
                                schema,
                                pep)
                               VALUES
-                              (%s, 'leaf', %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
+                              (%s, 'leaf', %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
                            (nodeIdentifier,
+                            config[const.OPT_ACCESS_MODEL],
                             config['pubsub#persist_items'],
                             config['pubsub#deliver_payloads'],
-                            config['pubsub#send_last_published_item'],
-                            config[const.OPT_ACCESS_MODEL],
-                            config[const.OPT_PUBLISH_MODEL],
+                            config[const.OPT_MAX_ITEMS],
                             config[const.OPT_OVERWRITE_POLICY],
                             config[const.OPT_SERIAL_IDS],
                             config[const.OPT_CONSISTENT_PUBLISHER],
                             config[const.OPT_FTS_LANGUAGE],
+                            config['pubsub#send_last_published_item'],
+                            config[const.OPT_PUBLISH_MODEL],
                             schema,
                             recipient.userhost() if pep else None
                             )