From 3749d041cbd76787d46b829360da8748d14c2af7 Mon Sep 17 00:00:00 2001 From: 1aerostorm Date: Sun, 12 Nov 2023 02:12:24 +0000 Subject: [PATCH] Test --- db/app.lua | 5 ++++- db/reg_pollers.lua | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/db/app.lua b/db/app.lua index 112622b..72882ca 100644 --- a/db/app.lua +++ b/db/app.lua @@ -9,7 +9,6 @@ io.output():setvbuf('no') box.cfg { log_level = 5, - listen = '0.0.0.0:3301', memtx_memory = 1 * 1024 * 1024 * 1024, wal_dir = '/var/lib/tarantool', memtx_dir = '/var/lib/tarantool', @@ -96,3 +95,7 @@ end) print('applying migrations...') reg_pollers_migration_v1() + +print('listening...') + +box.cfg { listen = '0.0.0.0:3301' } diff --git a/db/reg_pollers.lua b/db/reg_pollers.lua index 01420c2..c5d760a 100644 --- a/db/reg_pollers.lua +++ b/db/reg_pollers.lua @@ -1,10 +1,12 @@ fiber = require 'fiber' function reg_pollers_migration_v1() - if box.space.reg_pollers ~= nil then - return + if box.space.reg_pollers == nil then + box.schema.sequence.create('reg_pollers') + else + box.space.reg_pollers:drop() + fiber.sleep(2) end - box.schema.sequence.create('reg_pollers') reg_pollers = box.schema.create_space('reg_pollers', { format = { {name = 'id', type = 'unsigned'},