Skip to content

Commit

Permalink
addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitakinger committed May 3, 2024
1 parent 2e8e164 commit bb69ebf
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 50 deletions.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions app/client/src/ee/workers/Evaluation/evalWorkerActions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export * from "ce/workers/Evaluation/evalWorkerActions";
import { MAIN_THREAD_ACTION as CE_MAIN_THREAD_ACTION } from "ce/workers/Evaluation/evalWorkerActions";

export const MAIN_THREAD_ACTION = {
...CE_MAIN_THREAD_ACTION,
LOG_JS_FUNCTION_EXECUTION: "LOG_JS_FUNCTION_EXECUTION",
};
22 changes: 0 additions & 22 deletions app/client/src/workers/Evaluation/fns/utils/TriggerEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import { WorkerMessenger } from "workers/Evaluation/fns/utils/Messenger";
import type { UpdatedPathsMap } from "workers/Evaluation/JSObject/JSVariableUpdates";
import { applyJSVariableUpdatesToEvalTree } from "workers/Evaluation/JSObject/JSVariableUpdates";
import ExecutionMetaData from "./ExecutionMetaData";
import type {
TriggerKind,
TriggerSource,
} from "constants/AppsmithActionConstants/ActionConstants";
import type { UpdateActionProps } from "workers/Evaluation/handlers/updateActionData";
import { handleActionsDataUpdate } from "workers/Evaluation/handlers/updateActionData";
import { getEntityNameAndPropertyPath } from "@appsmith/workers/Evaluation/evaluationUtils";
Expand All @@ -22,7 +18,6 @@ export enum BatchKey {
process_batched_triggers = "process_batched_triggers",
process_batched_fn_execution = "process_batched_fn_execution",
process_js_variable_updates = "process_js_variable_updates",
process_batched_fn_invoke_log = "process_batched_fn_invoke_log",
}

const TriggerEmitter = new EventEmitter();
Expand Down Expand Up @@ -167,21 +162,4 @@ TriggerEmitter.on(
jsVariableUpdatesHandlerWrapper,
);

export const fnInvokeLogHandler = deferredBatchedActionHandler<{
jsFnFullName: string;
isSuccess: boolean;
triggerMeta: {
source: TriggerSource;
triggerPropertyName: string | undefined;
triggerKind: TriggerKind | undefined;
};
}>((data) => {
WorkerMessenger.ping({
method: MAIN_THREAD_ACTION.LOG_JS_FUNCTION_EXECUTION,
data,
});
});

TriggerEmitter.on(BatchKey.process_batched_fn_invoke_log, fnInvokeLogHandler);

export default TriggerEmitter;
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isPromise } from "workers/Evaluation/JSObject/utils";
import { postJSFunctionExecutionLog } from "@appsmith/workers/Evaluation/JSObject/postJSFunctionExecution";
import TriggerEmitter, { BatchKey } from "./TriggerEmitter";
import ExecutionMetaData from "./ExecutionMetaData";
function addMetaDataToError(e: any, fnName: string, fnString: string) {
Expand Down Expand Up @@ -42,10 +41,7 @@ function saveExecutionData({
export function jsObjectFunctionFactory<P extends ReadonlyArray<unknown>>(
fn: (...args: P) => unknown,
name: string,
postProcessors: PostProcessor[] = [
saveExecutionData,
postJSFunctionExecutionLog,
],
postProcessors: PostProcessor[] = [saveExecutionData],
) {
return function (this: unknown, ...args: P) {
if (!ExecutionMetaData.getExecutionMetaData().enableJSFnPostProcessors) {
Expand Down

0 comments on commit bb69ebf

Please sign in to comment.