question

John Peterson avatar image
John Peterson asked

Any way to "reset" all CloudScript instances?

Dear PlayFab community,

Is there any way to forcibly restart all CloudScript instances without loading a new Version? I ask, because sometimes it'd be convenient to clear any cached objects throughout the enterprise (e.g. when TitleData and/or CatalogItem objects are changed, etc.).

With the distributed nature of this platform, it doesn't appear that we have any mechanisms to do any "global" activities that would communicate across the enterprise, but I thought I'd see if anyone has any suggestions.

apisCloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Can you clarify what it is you're attempting to do with Cloud Script? Are you using static objects to try to store something across executions?

Cloud Script is designed as a way to have lightweight, server-authoritative actions that are stateless, in general. It's possible for you to use static objects to attempt to "cache" some data for efficiency of the operations, but it's important to bear in mind that your game may have multiple, distinct servers servicing your Cloud Script calls. Those servers will not be communicating with each other in any way, and any one of them may unload your script at any time (based on overall load).

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

John Peterson avatar image John Peterson commented ·

Thanks, Brendan! I think I understand you perfectly when you explain the distributed nature of the system and the fact that there might be multiple, distinct servers hosing our CloudScript calls. I was wondering if there was a way to manually bring down all instances of our CloudScript calls across these distributed servers? I'm guessing not, based on your answer, without uploading a new version of of the code.

0 Likes 0 ·
brendan avatar image brendan John Peterson commented ·

Can you help me understand the scenario you have in mind? What would be trying to accomplish, in terms of the game behavior?

It is the case that you'll be using the published Cloud Script revision, in general. So changing the published revision to be one that is a no-op would be a way to simply stop any behavior from the script.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.