Event cloud code not running when called from cloud code module
J
Joshua K Akana
started a topic
about 7 years ago
I recently implemented an event and connected it to a running total so that we could update a leaderboard. I then added some cloud code to that event to update an entry in a collection.
What I've found is that, when calling this event via the test harness, the leaderboard is updated as expected and the cloud code is executed, hence updating the collection as expected. However, when I log an event request to this same event via cloud code, only the leaderboard is updated. Below is how I am making the event request.
var req = new SparkRequests.LogEventRequest();
req.eventKey = "eventName";
req.data = data;
var result = req.Send();
Is this a known bug, or am I doing something wrong?
Best Answer
T
Tech Support
said
about 7 years ago
Hi Joshua
Cloud code is not executed on requests sent from cloud code, this restriction is currently in place to stop infinite loops that could occur.
I've updated the SparkRequests documentation to make this clear.
Joshua K Akana
I recently implemented an event and connected it to a running total so that we could update a leaderboard. I then added some cloud code to that event to update an entry in a collection.
What I've found is that, when calling this event via the test harness, the leaderboard is updated as expected and the cloud code is executed, hence updating the collection as expected. However, when I log an event request to this same event via cloud code, only the leaderboard is updated. Below is how I am making the event request.
var req = new SparkRequests.LogEventRequest();
req.eventKey = "eventName";
req.data = data;
var result = req.Send();
Is this a known bug, or am I doing something wrong?
Hi Joshua
Cloud code is not executed on requests sent from cloud code, this restriction is currently in place to stop infinite loops that could occur.
I've updated the SparkRequests documentation to make this clear.
Gabriel
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTech Support
Hi Joshua
Cloud code is not executed on requests sent from cloud code, this restriction is currently in place to stop infinite loops that could occur.
I've updated the SparkRequests documentation to make this clear.
Gabriel
Joshua K Akana
Good to know. Thanks for the quick response!
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics