How do I ensure my API can’t process the same method simultaneously
I have a method in my API that handles the sync operations with the company’s ERP. This method is called once every 30 minutes by a script I made to ensure that everything will be always up date. However, if someone wants, they also can make a request to the endpoint by themselves, but they also need to be informed if the operation is currently processing or not