[
https://issues.apache.org/jira/browse/SLING-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13759017#comment-13759017
]
Victor Saar commented on SLING-3028:
------------------------------------
bq. Just a first quick draft
API draft looks generally good, but a few comments:
* Providing ETA on {{start()}} seems weird, as you usually only know it after
doing at least some work, and you usually update it continuously. I'd rather
add a separate {{setEta()}} method or update it when setting progress.
* What's the semantic when not providing an ETA? Will the job engine compute
one itself (if yes, using a naive approach would certainly be enough)?
* For log output, how about providing a buffered {{Writer}} instead, which
allows jobs to use a {{PrintWriter}} for example
bq. Could it be that a "successful" job wants to report some output as well,
because it failed partially or produced warnings, that did not make it fail for
the job manager?
I definitely see use cases like that. We could introduce a new
{{JobState.OK_WITH_WARNINGS}} for example that isn't failed for the job engine,
but kept for further investigation. But we could also just use the queue
configuration Carsten suggested, which is more flexible. And you usually know
what kind of jobs can exhibit such behavior.
> Support for progress tracking of jobs
> -------------------------------------
>
> Key: SLING-3028
> URL: https://issues.apache.org/jira/browse/SLING-3028
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Victor Saar
> Labels: jobs
>
> For long-running jobs, it would be useful to have some means to track
> progress, which can be shown in a console for the user. This should include
> the following:
> * ETA
> * Completeness value computed from (optional, defaults to 1.0) max and
> current value (e.g. 42% or 23/100)
> * Log output stream for detailed progress information
> * Failure reason in case job failed
> AFAICS this requires a few changes to the existing implementation:
> * Jobs need additional support for setting properties, e.g. max and current
> progress value
> * Jobs need to be kept at least for a while after they completed/failed to
> give access to failure information/log stream
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira