Browse Source
Merge pull request #9144 from smatvienko-tb/hotfix/script_blocked_log_tenant_id
AbstractScriptInvokeService: tenantId added to the log on script invocation blocked
pull/9223/head^2
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
common/script/script-api/src/main/java/org/thingsboard/script/api/AbstractScriptInvokeService.java
|
|
|
@ -150,7 +150,7 @@ public abstract class AbstractScriptInvokeService implements ScriptInvokeService |
|
|
|
} |
|
|
|
apiUsageReportClient.ifPresent(client -> client.report(tenantId, customerId, ApiUsageRecordKey.JS_EXEC_COUNT, 1)); |
|
|
|
pushedMsgs.incrementAndGet(); |
|
|
|
log.trace("InvokeScript uuid {} with timeout {}ms", scriptId, getMaxInvokeRequestsTimeout()); |
|
|
|
log.trace("[{}] InvokeScript uuid {} with timeout {}ms", tenantId, scriptId, getMaxInvokeRequestsTimeout()); |
|
|
|
var task = doInvokeFunction(scriptId, args); |
|
|
|
|
|
|
|
var resultFuture = Futures.transformAsync(task.getResultFuture(), output -> { |
|
|
|
@ -167,7 +167,7 @@ public abstract class AbstractScriptInvokeService implements ScriptInvokeService |
|
|
|
} else { |
|
|
|
String message = "Script invocation is blocked due to maximum error count " |
|
|
|
+ getMaxErrors() + ", scriptId " + scriptId + "!"; |
|
|
|
log.warn(message); |
|
|
|
log.warn("[{}] " + message, tenantId); |
|
|
|
return error(message); |
|
|
|
} |
|
|
|
} else { |
|
|
|
|