Closed AndreyMashukov closed 4 months ago
https://github.com/AndreyMashukov/go-crypto-bot/blob/d1773242a95e96bbff41c00cbaffc74fd8c86c09/src/repository/exhange_repository.go#L708
Make two separate methods
first one is for saving current price Second one is for updating history
Push last price to history during reading history
It will allow us to decrease cpu usage and avoid having duplicated data in redis list
https://github.com/AndreyMashukov/go-crypto-bot/blob/d1773242a95e96bbff41c00cbaffc74fd8c86c09/src/repository/exhange_repository.go#L708
Make two separate methods
first one is for saving current price Second one is for updating history
Push last price to history during reading history