I want to create a webhook that notifies the player of the rotation everytime it happens (24 hours), now this rotation system in itself works and I know how to make a webhook.
I’m only running into the issue of multiple servers executing this webhook at the same time everytime the rotation happens whilst I only want it to appear once.
For anyone else facing this issue and looking for a solution, I’ve used MemoryStoreService making use of a queue. I check if an item is in the memory queue and if not I add that item to the queue with an expiration of 12 hours and execute the webhook as usual so that if the request is repeated again it wont happen because that item is within the queue.
I figured this out after finding out MemoryStoreService is a nearly identical external database and is not server-focused.