GanfengTan commented on code in PR #5910: URL: https://github.com/apache/inlong/pull/5910#discussion_r974855940
########## inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/fetcher/ManagerFetcher.java: ########## @@ -300,6 +307,24 @@ private void dealWithFetchResult(TaskResult taskResult) { } } + private boolean triggerIsRunning(TriggerProfile newProfile) { + int type = ManagerOpEnum.getOpType(newProfile.getInt(JOB_OP)).getType(); + if (ManagerOpEnum.ACTIVE.getType() != type || ManagerOpEnum.ADD.getType() != type) { + return false; + } + JobProfileDb jobProfileDb = agentManager.getJobProfileDb(); + List<JobProfile> jobsByState = jobProfileDb.getJobsByState(StateSearchKey.ACCEPTED); + jobsByState.addAll(jobProfileDb.getJobsByState(StateSearchKey.RUNNING)); + AtomicBoolean jobIsRunning = new AtomicBoolean(false); + jobsByState.forEach(jobProfile -> { + if (jobProfile.get(JOB_ID).equals(newProfile.get(JOB_ID))) { Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org