You need to sign in to do that
Don't have an account?
Vinnie B
How can you prevent future functions from locking out other future functions?
I have a program that runs every morning at 4:00 am. Since it does some CPU intensive calculations I put some of the heavy lifting into five future functions that are called from within the main program. Things generally are working fine.
Occassionally, I'll get a message about locked rows. This is, of course, quite bad as some of my updates just don't happen.
I did some other coding with batch files and got around this by having Batch-1 call Batch-2 which calls Batch-3, etc. Is there some way to make sure five different future calls won't run at the same time?
Thanks!
Occassionally, I'll get a message about locked rows. This is, of course, quite bad as some of my updates just don't happen.
I did some other coding with batch files and got around this by having Batch-1 call Batch-2 which calls Batch-3, etc. Is there some way to make sure five different future calls won't run at the same time?
Thanks!
In the long run, I should re-work the logic that's causing the heavy CPU usage. But that's a topic for a whole other thread. :)
Without knowing a little more info, it's kind of hard to see what needs to be done. :)
Secondly, I was hoping there was a way to code Apex such that it would try the query again if it first couldn't create the lock on the rows in the table. I could show you all of my code, but I think my problem is a more generic one such that seeing my code wouldn't help much.
THANKS for your help!!