Skip to content

Commit

Permalink
do not throw exception from method processor
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Jan 17, 2023
1 parent a74468d commit b004cec
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
package com.agorapulse.worker.processor;

import com.agorapulse.worker.JobConfiguration;
import com.agorapulse.worker.JobConfigurationException;
import com.agorapulse.worker.JobManager;
import com.agorapulse.worker.JobScheduler;
import com.agorapulse.worker.WorkerConfiguration;
import com.agorapulse.worker.annotation.*;
import com.agorapulse.worker.annotation.Job;
import com.agorapulse.worker.configuration.DefaultJobConfiguration;
import com.agorapulse.worker.configuration.MutableJobConfiguration;
import io.micronaut.context.ApplicationContext;
Expand Down Expand Up @@ -130,7 +132,11 @@ public void process(BeanDefinition<?> beanDefinition, ExecutableMethod<?, ?> met
return;
}

jobScheduler.schedule(task);
try {
jobScheduler.schedule(task);
} catch (JobConfigurationException e) {
LOG.error("Job declared in method " + method + " is ignored because it is not correctly configured", e);
}
}

private String getJobName(BeanDefinition<?> beanDefinition, ExecutableMethod<?, ?> method) {
Expand Down

0 comments on commit b004cec

Please sign in to comment.