eoscostarica / eos-rate

EOS Block Producer Ratings and Voting Portal :star2:
https://eosrate.io
MIT License
27 stars 27 forks source link

Hasura action error #596

Closed xavier506 closed 3 years ago

xavier506 commented 3 years ago

Hasura action triggered by a rating is returning the following error

==== updating user ratings ====
WARNING: Creating a duplicate database object for the same connection.
    at new Database (/opt/application/node_modules/massive/lib/database.js:76:24)
    at module.exports (/opt/application/node_modules/massive/index.js:32:11)
    at updateUserRatings (/opt/application/src/libs/sync-user-rating.js:33:22)
WARNING: Creating a duplicate database object for the same connection.
    at new Database (/opt/application/node_modules/massive/lib/database.js:76:24)
    at module.exports (/opt/application/node_modules/massive/index.js:32:11)
    at updateStat (/opt/application/src/libs/sync-bp-stats.js:36:11)
NaN

Link to Hasura Action

https://github.com/eoscostarica/eos-rate/blob/88031f17edcfceb5473140481b7e02342846bf5d/services/hasura/metadata/actions.yaml#L5

leisterfrancisco commented 3 years ago

Error doesn't appear after some test, but some improvements to sync-bps, proxies and rating will be made

leisterfrancisco commented 3 years ago

Some bugs or performance improvements will be solved in #609 #610 #611

leisterfrancisco commented 3 years ago

A similar error were found at add-bps-info, the cause was exist a for loop that is calling a function which instantiate massive so then next for interation, already exist that instantiation and a WARNING message comes up.

Error will be fixed in https://github.com/eoscostarica/eos-rate/pull/617