This topic contains 4 replies, has 0 voices, and was last updated by chanarbon 7 years, 8 months ago.
-
AuthorPosts
-
February 1, 2017 at 3:56 pm #1216
tbousfieldIs there a way to reset the usage limit in SS 2.0?
This is a cached copy. Click here to see the original post. -
February 2, 2017 at 8:51 am #1217
david.smithWhat are you trying to do? The short answer is no. But there is always room for code review/improvements or performing the process another way.
erictgrubaugh replied on 02/02/2017, 10:22 AM: Yes! If you share your code we can help analyze and optimize it to minimize the governance usage. The governance limit is there so you don’t have runaway code on a shared server instance. The approach should be to fix the script design rather than circumvent the limit.
-
February 25, 2017 at 3:12 am #1218
chanarbonIf you want to do it in scheduled script in 2.0, no. You can use Map/Reduce and build the code keeping in mind that the code runs with parallel context. I also agree with Eric from the statement above that it is rather a matter of better logic or placing of the functions e.g. why not use submitFields() instead of load and save()
-
March 6, 2017 at 11:07 am #1219
ialanHere is the code for rescheduling script in Suitescript 2.0
[CODE]
function reschedule(rescheduleParams) {
var scriptTask = task.create({
taskType : task.TaskType.SCHEDULED_SCRIPT
});
scriptTask.scriptId = ‘customscript_xxx’;
scriptTask.deploymentId = ‘customdeploy_yyy’;
scriptTask.params = rescheduleParams;
var scriptTaskId = scriptTask.submit();
log.debug(‘Success:’ + scriptTaskId);
}
[CODE]
-
March 6, 2017 at 9:23 pm #1220
chanarbonOriginally posted by ialan
View Post
Here is the code for rescheduling script in Suitescript 2.0
[CODE]
function reschedule(rescheduleParams) {
var scriptTask = task.create({
taskType : task.TaskType.SCHEDULED_SCRIPT
});
scriptTask.scriptId = ‘customscript_xxx’;
scriptTask.deploymentId = ‘customdeploy_yyy’;
scriptTask.params = rescheduleParams;
var scriptTaskId = scriptTask.submit();
log.debug(‘Success:’ + scriptTaskId);
}
[CODE]
Yup. You can perform scheduling API but it does not totally reset the usage units with the current working context that’s why better use M/R as it would automatically perform the yielding for you.
-
AuthorPosts
You must be logged in to reply to this topic.