Trying to run a task that needs to update ~2,800 records.
This used to work fine before the Payment system was changed to charge differently for functions. I’m guessing There was put a hard 20 second limit in there, that wasn’t there before? or limited the performance of the functions so they can’t finish the task within 20 seconds.
I was previously told to use aliases to update MANY records, as there is no UpdateMany functionality in 8base. So this is what I’m doing. It used to work, now it doesn’t
I generate my mutation like this:
mutation UPDATE_AI_REPORTS_MUTATION($RGLS_scores: JSON,$RGA_scores: JSON) {
RGLS: aIReportUpdate(filter: { ticker: "RGLS" }, data: {
ticker: "RGLS",
name: "Regulus Therapeutics Inc.",
scores: $RGLS_scores,
price: 1.29,
date: "2020-01-08",
marketCap: 11.2475,
aIScore: -0.855133
}) { ticker }RGA: aIReportUpdate(filter: { ticker: "RGA" }, data: {
ticker: "RGA",
name: "Reinsurance Group of America Incorporated",
scores: $RGA_scores,
price: 159.15,
date: "2020-01-08",
marketCap: 10359.7,
aIScore: -0.232467
}) { ticker }
}
Where the variables are generated like this:
{
RGLS_scores: {
ai_soundness: -0.818182,
ai_stewardship: -0.75,
ai_profitability: -0.714286,
ai_growth: -0.25,
ai_value: -0.636364,
ai_reward: -0.855133,
ai_safety: -1,
ai_score: -0.855133
},
RGA_scores: {
ai_soundness: 0.0909091,
ai_stewardship: 0.25,
ai_profitability: -0.428571,
ai_growth: 0,
ai_value: -0.818182,
ai_reward: 0.117533,
ai_safety: 0.0006,
ai_score: -0.232467
}
}
As far as I can tell this is valid, and it works fine if I do it with just a few update aliases. But now when I scale this to ~2.8k records. My task just keeps timing out at 20 seconds…
If you’re not going to provide a faster way to run this function, there should at least be a way to increase the timeout period to a reasonable amount? Or am I doing something completely wrong?
It’s very concerning that a function like this used to work just fine and now it breaks? Stability is one of the main factors you expect from a service like 8base. If I don’t change my function, the function REALLY shouldn’t break due to an update from 8base???
Please help fix this.