[
https://issues.apache.org/jira/browse/SLING-7197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235286#comment-16235286
]
ASF GitHub Bot commented on SLING-7197:
---------------------------------------
cziegeler closed pull request #1: SLING-7197 Completed Scheduled Jobs are not
getting fetched.
URL: https://github.com/apache/sling-org-apache-sling-event/pull/1
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/src/main/java/org/apache/sling/event/impl/jobs/scheduling/ScheduledJobHandler.java
b/src/main/java/org/apache/sling/event/impl/jobs/scheduling/ScheduledJobHandler.java
index 01ca010..0df2a9c 100644
---
a/src/main/java/org/apache/sling/event/impl/jobs/scheduling/ScheduledJobHandler.java
+++
b/src/main/java/org/apache/sling/event/impl/jobs/scheduling/ScheduledJobHandler.java
@@ -28,6 +28,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
+import org.apache.jackrabbit.JcrConstants;
import org.apache.sling.api.resource.ModifiableValueMap;
import org.apache.sling.api.resource.PersistenceException;
import org.apache.sling.api.resource.Resource;
@@ -295,6 +296,7 @@ private ScheduledJobInfoImpl addOrUpdateScheduledJob(
properties.remove(ResourceResolver.PROPERTY_RESOURCE_TYPE);
properties.remove(Job.PROPERTY_JOB_CREATED);
properties.remove(Job.PROPERTY_JOB_CREATED_INSTANCE);
+ properties.remove(JcrConstants.JCR_PRIMARYTYPE);
final String jobTopic = (String)
properties.remove(ResourceHelper.PROPERTY_JOB_TOPIC);
final String schedulerName = (String)
properties.remove(ResourceHelper.PROPERTY_SCHEDULE_NAME);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Completed Scheduled Jobs are not getting fetched
> ------------------------------------------------
>
> Key: SLING-7197
> URL: https://issues.apache.org/jira/browse/SLING-7197
> Project: Sling
> Issue Type: Bug
> Components: API
> Affects Versions: Event 4.2.8
> Reporter: Praful Vaishnav
> Priority: Major
> Fix For: Event 4.2.10
>
>
> Scheuled jobs are created as _slingevent:TimedEvent_ under path
> _/var/eventing/scheduled-jobs_. When these jobs execution are complete, they
> are moved under path `/var/eventing/jobs/finished`. Prior to completion, we
> can get scheduled jobs using [API JobManager.getScheduledJobs|
> https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#getScheduledJobs-java.lang.String-long-java.util.Map...-
> ]. But I could not find any API to get scheduled jobs which are completed.
> [API JobManager.findJobs|
> https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#findJobs-org.apache.sling.event.jobs.JobManager.QueryType-java.lang.String-long-java.util.Map...-]
> returns only jobs of type _slingevent:Job_
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)