pendulum-chain / pendulum-squids

The subsquid squids we use for Pendulum/Amplitude/Foucoco.
GNU General Public License v3.0
0 stars 0 forks source link

Await database operations #55

Closed ebma closed 6 months ago

ebma commented 6 months ago

The squid on Amplitude is frequently facing errors with

too late to perform db updates, make sure you haven't forgot to await on db query

which probably happens because we don't await the database operations in all functions that interact with the squid store object.

TODO

Use await in functions that interact with the ctx.store, e.g. here. To make sure we don't miss this we can think about adding this ESlint rule.

prayagd commented 6 months ago

Putting this in maintenance epic