SetShouldSaveResult
job.setShouldSaveResult(shouldSaveResult)
job.setShouldSaveResult(shouldSaveResult)
The setShouldSaveResult
method sets a flag indicating whether the outcome of the job's execution should be persisted in the database. This option is useful for managing storage and performance by selectively saving results only when necessary.
This does NOT save the job in the database. you must explicitly declare save()
if you want to save it
Example Usage
Parameters
shouldSaveResult
(boolean
): A boolean flag that determines if the job’s result should be saved upon completion. Setting this totrue
enables result persistence, whilefalse
disables it.
Returns
Job
: Returns the job instance, allowing for method chaining.
Last updated