Bisonai / orakl

Official Oracle of Kaia Blockchain
https://orakl.network
MIT License
70 stars 15 forks source link

handle edge case in Pool package #1774

Closed Intizar-T closed 3 days ago

Intizar-T commented 2 months ago

pool package is designed to run multiple goroutines at request. aggregator and accumulator starts a pool worker every 400 and 250ms, respectively. In both cases workers write data to redis and postgres db.

As an average case, we don't expect any race condition. But as an edge case, we might end up with:

Intizar-T commented 2 months ago

Pool package currently is not being used. It should be removed completely if it wont be used after adding 100 pairs.