Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress error log on ObjectAlreadyExistsException #38

Open
konieshadow opened this issue May 22, 2019 · 0 comments
Open

Suppress error log on ObjectAlreadyExistsException #38

konieshadow opened this issue May 22, 2019 · 0 comments

Comments

@konieshadow
Copy link

When schedule some job, I want to catch the ObjectAlreadyExistsException to determine whether exists a same job and then reschedule it. This works fine but the log output from RedisStorage is annoying. Like this:

2019-05-22 16:42:47.475  INFO 9064 --- [           main] n.joelinn.quartz.jobstore.RedisJobStore  : Job and / or trigger already exist in storage.

org.quartz.ObjectAlreadyExistsException: Unable to store Job : 'com.handarui.novel.server.biz.task.IndexUpdateNovelJob.indexUpdateNovel', because one already exists with this identification.
	at net.joelinn.quartz.jobstore.RedisStorage.storeJob(RedisStorage.java:167)
	at net.joelinn.quartz.jobstore.RedisStorage.storeJob(RedisStorage.java:26)
	at net.joelinn.quartz.jobstore.RedisJobStore$1.doWithLock(RedisJobStore.java:263)
	at net.joelinn.quartz.jobstore.RedisJobStore$1.doWithLock(RedisJobStore.java:260)
	at net.joelinn.quartz.jobstore.RedisJobStore.doWithLock(RedisJobStore.java:1154)
	at net.joelinn.quartz.jobstore.RedisJobStore.doWithLock(RedisJobStore.java:1136)
	at net.joelinn.quartz.jobstore.RedisJobStore.storeJobAndTrigger(RedisJobStore.java:260)
	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886)
	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249)
	at com.handarui.novel.server.biz.task.QuartzStartRunner.startIndexUpdateNovelJob(QuartzStartRunner.kt:132)
	at com.handarui.novel.server.biz.task.QuartzStartRunner.run(QuartzStartRunner.kt:29)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:732)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:716)
	at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
	at com.handarui.novel.server.Main.main(Main.java:22)

I wunder if it can be suppressed and just let user to handle the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant