Are there global locks for cloud functions

There are some logic in my cloud function that I need to run atomically.

For example, suppose Moralis is running two instances of my cloud code. Now there are two users calling the same function. The first user’s request is sent to the first server instance, and the second user’s request is sent to the second server instance. I need to make sure that the processing of either one’s request finishes before the processing of the other one starts.

How do I achieve this?

1 Like

on an upgraded Moralis Server instance it can happen that requests are processed in parallel

I’ll get back when I have more info

2 Likes