Skip to content

Commit

Permalink
fix(quartz): fail to fire triggers manually with exception "job does …
Browse files Browse the repository at this point in the history
…not exist"

Fix #1049
  • Loading branch information
tadayosi committed Jan 8, 2025
1 parent e3c2889 commit 5f477ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/hawtio/src/plugins/quartz/quartz-service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { eventService } from '@hawtiosrc/core'
import { AttributeValues, MBeanNode, jolokiaService, workspace } from '@hawtiosrc/plugins/shared'
import { getQueryParameterValue } from '@hawtiosrc/util/urls'
import { JolokiaRequest } from 'jolokia.js'
import Jolokia from '@jolokia.js/simple'
import { JolokiaRequest } from 'jolokia.js'
import { attributeService } from '../shared/attributes/attribute-service'
import { jmxDomain, log } from './globals'

Expand Down Expand Up @@ -345,15 +345,15 @@ class QuartzService {
})
}

async triggerJob(schedulerMBean: string, name: string, group: string, parameters: string) {
async triggerJob(schedulerMBean: string, jobName: string, jobGroup: string, parameters: string) {
await jolokiaService.execute(schedulerMBean, QUARTZ_OPERATIONS.triggerJob, [
name,
group,
jobName,
jobGroup,
parameters === '' ? {} : JSON.parse(parameters),
])
eventService.notify({
type: 'success',
message: `Manually fired trigger: ${group}/${name}`,
message: `Manually fired trigger: ${jobGroup}/${jobName}`,
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const TriggersManualModal: React.FunctionComponent<{
}

const { objectName } = selectedNode
const { name, group } = input
const { name, group, jobName, jobGroup } = input

const fireTrigger = () => {
log.info('Manually fire trigger:', objectName, input, parameters)
quartzService.triggerJob(objectName, name, group, parameters)
quartzService.triggerJob(objectName, jobName, jobGroup, parameters)
clear()
}

Expand Down

0 comments on commit 5f477ef

Please sign in to comment.