Skip to content

Commit 3d6a71d

Browse files
Cmdvkderme
authored andcommitted
adjust sleep time and remove modbase check
1 parent b35cfc4 commit 3d6a71d

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

cardano-db-sync/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ In the schema docs, you can search for `13.2` or `Conway` for schema changes fro
2323
- Replaced new_committee.quorum to new_committee.quorum_nominator and new_committee.quorum_denominator
2424
- always_abstain and always_no_confidence drep_hash entries now have a null `raw` value and the unique key changed
2525
- governance_action.description now uses the json format
26+
- new offchain capabilites for voting anchor
2627

2728
### sancho-2.3.0
2829
- is compatible with node 8.7-pre

cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ insertShelleyBlock syncEnv shouldLog withinTwoMins withinHalfHour blk details is
200200
. lift
201201
$ insertOffChainVoteResults tracer (envOffChainVoteResultQueue syncEnv)
202202

203-
when (ioOffChainPoolData iopts && unBlockNo (Generic.blkBlockNo blk) `mod` offChainModBase == 0)
203+
when (ioOffChainPoolData iopts)
204204
. lift
205205
$ insertOffChainPoolResults tracer (envOffChainPoolResultQueue syncEnv)
206206
where
@@ -223,9 +223,6 @@ insertShelleyBlock syncEnv shouldLog withinTwoMins withinHalfHour blk details is
223223
Generic.Shelley -> "insertShelleyBlock"
224224
other -> mconcat ["insertShelleyBlock(", textShow other, ")"]
225225

226-
offChainModBase :: Word64
227-
offChainModBase = if withinTwoMins then 10 else 2000
228-
229226
tracer :: Trace IO Text
230227
tracer = getTrace syncEnv
231228

cardano-db-sync/src/Cardano/DbSync/OffChain.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ runFetchOffChainVoteThread syncEnv = do
202202
queueVoteInsert :: OffChainVoteResult -> IO ()
203203
queueVoteInsert = atomically . writeTBQueue (envOffChainVoteResultQueue syncEnv)
204204

205-
-- 60 second sleep
205+
-- 5 minute sleep in milliseconds
206206
tDelay :: IO ()
207-
tDelay = threadDelay 60_000_000
207+
tDelay = threadDelay 300_000_000
208208

209209
---------------------------------------------------------------------------------------------------------------------------------
210210
-- Fetch OffChain data

0 commit comments

Comments
 (0)