my business logic code which haves a timer in it which suppose to trigger every 1 hour (tested with 6 minutes on production & with 1 minute on local debug) is not working as it supposed to work after deploying it but in debug it works perfectly , why is it happening ? is it cause of the network call limit ?? or its something else ?
When you say “not working as it supposed to work”, could you describe how it works and what the expected behavior is? Is it not triggering at all? If so, how did you verify it?
it is triggering , it supposed to update a table (all records in it ) but currently it updating it in odd numbers , sometime it updates 8 records , sometime 3 sometime 40 etc but while debugging its updating every single record correctly.
If the code takes more than 5 seconds to run, it will be interrupted (unless you purchased a function pack), and that would explain the behavior you see in production (the debug mode does not have the 5 seconds limit)
alright , then how can i update it using collection ? like instead of updating every single record updating the whole table via passing a array ??
Are the objects you are updating “children” of some other object?
No they are not , just some string , integer objects And yeah one is related to users table
There are two ways to update multiple objects in a single shot:
-
Send to the server parent object with a collection of child objects. Every child will be updated in the related table.
-
Use bulk update (available only in REST API)
If neither one of these is applicable to you, then you should do it individually.
Mark
Alright mark i’ll try them. Thanks and have a happy new year.
You are welcome and happy new year to you too!
P.s. nice to close the year with a conversation with billion bucks)))