Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Nov 12, 2023
1 parent 26793be commit 3749d04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion db/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -96,3 +95,7 @@ end)

print('applying migrations...')
reg_pollers_migration_v1()

print('listening...')

box.cfg { listen = '0.0.0.0:3301' }
8 changes: 5 additions & 3 deletions db/reg_pollers.lua
Original file line number Diff line number Diff line change
@@ -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'},
Expand Down

0 comments on commit 3749d04

Please sign in to comment.