Platform Explorer / Nuxeo Platform 5.6

Component org.nuxeo.ecm.core.work.config

Documentation

The default queue configuration for the work manager, the scheduled job to cleanup the completed work instances, and the related listener.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.work.config" version="1.0">

  <documentation>
    The default queue configuration for the work manager,
    the scheduled job to cleanup the completed work instances,
    and the related listener.
  </documentation>

  <extension target="org.nuxeo.ecm.core.work.service" point="queues">
    <queue id="default">
      <name>Default queue</name>
      <maxThreads>4</maxThreads>
      <!-- clear completed work instances older than one hour -->
      <clearCompletedAfterSeconds>3600</clearCompletedAfterSeconds>
    </queue>
  </extension>

  <extension target="org.nuxeo.ecm.core.scheduler.SchedulerService"
    point="schedule">
    <schedule id="workManagerCleanup">
      <username>Administrator</username>
      <event>workManagerCleanup</event>
      <!-- cleanup every 5 minutes -->
      <cronExpression>0 0/5 * * * ?</cronExpression>
    </schedule>
  </extension>

  <extension target="org.nuxeo.ecm.core.event.EventServiceComponent"
    point="listener">
    <listener name="workManagerCleanup" async="false"
      class="org.nuxeo.ecm.core.work.WorkManagerCleanupListener">
      <event>workManagerCleanup</event>
    </listener>
  </extension>

</component>