You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Leonardo Rodriguez (JIRA)" <ji...@apache.org> on 2018/05/10 16:46:00 UTC

[jira] [Updated] (SLING-7661) Provide mechanism to persist error message/s in Sling Jobs API

     [ https://issues.apache.org/jira/browse/SLING-7661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Rodriguez updated SLING-7661:
--------------------------------------
    Description: 
The sling Jobs API provides a JobConsumer interface: org.apache.sling.event.jobs.consumer.JobConsumer" and Job interface: org.apache.sling.event.jobs.Job.

Currently, when a JobConsumer fails, it's supposed to return a JobResult.CANCEL, but there is no way to set an error message.

Looking at the JCR, we see that such (failed/canceled) jobs are saved to /var/eventing/jobs/cancelled/ with a property "slingevent:finishedState=ERROR".

It would be beneficial to add a method to the Job interface to set an error String or List<String> for multiple errors (to save stacktrace perhaps). That way if a job fails we can debug the issue.

  was:
The sling Jobs API provides a job consumer interface "

org.apache.sling.event.jobs.consumer.JobConsumer" and job interface "

org.apache.sling.event.jobs.Job". Currently, if a JobConsumer fails, it returns a 

JobResult.CANCEL, but there is no way to set an error message. Looking at the JCR, we see that such jobs are saved to /var/eventing/jobs/cancelled/ with a property "slingevent:finishedState=ERROR". It would be beneficial to add a method to the JOB interface to set an error String or List<String> for mutliple errors (stacktrace perhaps). That way if a job fails we can debug the issue.


> Provide mechanism to persist error message/s in Sling Jobs API
> --------------------------------------------------------------
>
>                 Key: SLING-7661
>                 URL: https://issues.apache.org/jira/browse/SLING-7661
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Leonardo Rodriguez
>            Priority: Minor
>
> The sling Jobs API provides a JobConsumer interface: org.apache.sling.event.jobs.consumer.JobConsumer" and Job interface: org.apache.sling.event.jobs.Job.
> Currently, when a JobConsumer fails, it's supposed to return a JobResult.CANCEL, but there is no way to set an error message.
> Looking at the JCR, we see that such (failed/canceled) jobs are saved to /var/eventing/jobs/cancelled/ with a property "slingevent:finishedState=ERROR".
> It would be beneficial to add a method to the Job interface to set an error String or List<String> for multiple errors (to save stacktrace perhaps). That way if a job fails we can debug the issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)