Skip to content

Commit

Permalink
Some fixes in reg
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Nov 12, 2023
1 parent 39f1bb4 commit 5620038
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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' }
5 changes: 3 additions & 2 deletions src/pages/api/reg/[...all].js
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,17 @@ let handler = nextConnect({ attachParams: true, })
pollerRes = pollerRes[0][0]
} catch (err) {
console.error('ERROR: cannot upsert_reg_poller', err);
throwErr(req, 400, ['Cannot upsert reg_poller: ' + err.toString()])
}

if (pollerRes.err) {
throwErr(req, 400, [pollerRes.err])
}

const pollMsec = process.env.NODE_ENV === 'development' ? 1000 : 30000
const pollMsec = process.env.NODE_ENV === 'development' ? 1000 : 5000
let tries = 0
for ( ;; ) {
if (tries > 2) {
if (tries > 10) {
res.json({
status: 'err',
error: 'Timeouted'
Expand Down

0 comments on commit 5620038

Please sign in to comment.