-
Notifications
You must be signed in to change notification settings - Fork 983
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
Spring batch job enabled #144
Spring batch job enabled #144
Conversation
@jamesagnew could you please review this PR as the recent changes to the implementation requires a change to the building process when it can be avoided |
What is the root cause here? We shouldn't be disabling the batch job processor, it is needed in order to run batch jobs... HAPI won't work properly without it. |
@jvitrifork I assume this instruction was added when the boot stuff was added? |
The current instructions is to disable it. If it's to be enabled by default, then more parameters are missing. Please see #136 Caused by: org.springframework.batch.core.JobParametersInvalidException: There must be a valid number for readChunkSize, which is at least 1. You must include [resourceTypes] as a Job Parameter |
Why is this instruction needed though? We weren't recommending that people disable the job executor 2 weeks ago, and we make basic assumptions in hapi JPA that it is running. Making it easier to disable the executor is a band aid that will just make people have more subtle problems. @seanmcilvenna this should be reverted IMO. We need to address the root cause. |
Just wanted to chime in here, this toggle, |
I don't think this disables batch itself, just the spring-boot magic of auto-running all configured jobs at context boot time. Edit: As an aside, what a terrible name for a property, because it does read as though it is literally disabling all of spring batch |
This reverts commit 7550346.
@jamesagnew I have reverted... but I can definitely attest that I was not able to run hapi-fhir-jpaserver-starter without disabling spring.batch.job.enabled as well. The build is basically broken without this. So, I wonder if maybe it would be better to leave the PR merged, but create another PR that fixes the underlying issue and removes the |
Sorry - Given @tadgh it seems like I may have misunderstood what that setting was doing. If it isn't actually disabling the batch processing, making it the default seems ok |
Ok. I'll revert my revert. LoL |
Ok phew there was nothing to revert. "master" is still good, and has this changed merged into it. |
A little late to the party here I guess. I agree with @tadgh - this is a trigger on the Spring Boot AutoConfiguration part. Until the design or the proper Bean definitions as the required Batch job configurations are changed in HAPI FHIR, or added to this project, the default should be to disable spring.batch.job - and I agree that adding this to the yml file is the way to go (wonder why I didn't do this myself?). The thing that now makes me think, is that this setting is now crucial in the yml file as the server in its current state will not start up if this is set to true - just as crucial as having the right db address and so on |
Perhaps a line of doc in the config file would be proper to add |
This PR will remove the need to run -Dspring.batch.job.enabled=false and similar when running the hapi fhir jpa server before a few days ago.
Benefits: Avoid changing build process, and adding command line built parameters when it's not needed
Changes, defaulted the spring batch job enabled to false in application.yaml