feat(api): return job log ID from scheduler start API#3103
Merged
Conversation
Pre-generate a UUID for the JobLog document ID in the API action, pass it to the async job via LastaFlute launchNow params, and return it in the response so clients can track job execution.
marevol
added a commit
to codelibs/fessctl
that referenced
this pull request
Mar 28, 2026
Support the new jobLogId field added in codelibs/fess#3103. When a scheduler is started and job logging is enabled, the API now returns a pre-generated job log ID. Display it in text output so users can track job execution. JSON/YAML output already includes it via raw response dump. Backward compatible with older Fess versions.
marevol
added a commit
to codelibs/fessctl
that referenced
this pull request
Mar 28, 2026
) Support the new jobLogId field added in codelibs/fess#3103. When a scheduler is started and job logging is enabled, the API now returns a pre-generated job log ID. Display it in text output so users can track job execution. JSON/YAML output already includes it via raw response dump. Backward compatible with older Fess versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #1433: The scheduler start API (
PUT /api/admin/scheduler/{id}/start) now returns the associated job log ID in the response, allowing clients to programmatically track job execution without parsingscriptData.Changes Made
JOB_LOG_IDconstant for the parameter keystart(Map<String, Object> params)overload that passes parameters to LastaFlute'slaunchNow()viaLaunchNowOption.param()JOB_LOG_IDfromruntime.getParameterMap()and sets it on theJobLogbefore persisting to OpenSearchApiStartJobResponseinner class withjobLogIdfieldentity.start(Map), and returns it inApiStartJobResponseResponse format
When logging is enabled:
{"response": {"version": "14.x", "status": 0, "jobLogId": "a1b2c3d4e5f6..."}}When logging is disabled:
{"response": {"version": "14.x", "status": 0, "jobLogId": null}}Testing
put$start()with injected mock service, verifiesjobLogIdis non-null (32-char hex) when logging enabled, and null when disabledprocess()viaMockJobRuntime, verifies pre-generated ID is set onJobLogwhen present, null when absent, and not stored when logging disabledApiStartJobResponseDTO construction, fluent API, andStatusenumstart(Map)parameter passing vialaunchNowBreaking Changes
None. The existing
start()no-arg method is unchanged (used by Admin UI and Wizard). The API response adds a new field (jobLogId) which is additive.Additional Notes
launchNow()is asynchronous, so the job log may not exist immediately after the API returns. The ID is pre-generated and guaranteed to be used when the job executes.jobLogIdfield in the response