2.2.8.6. Update Statistic Data

The UpdateDataJob is used when there are abnormal changes in Forum data (such as migration). By default, UpdateDataJob is disabled at the server start up. When UpdateDataJob is running, it will calculate the statistic data in Forum to make sure that the statistic data are correct.

Configuration

The properties of Forum's UpdateDataJob is configured in /WEB-INF/ks-extension/ks/forum/statistics-configuration.xml which is located in the ks-extension webapp.


<component-plugin>
  <name>UpdateDataJob</name>
  <set-method>addPeriodJob</set-method>
  <type>org.exoplatform.services.scheduler.PeriodJob</type>
  <description>update topic count and post count to forum service</description>
  <init-params>
    <properties-param>
      <name>job.info</name>
      <description>save the monitor data  periodically</description>
      <property name="jobName" value="UpdateDataJob"/>
      <property name="groupName" value="KnowledgeSuite-forum"/>
      <property name="job" value="org.exoplatform.forum.service.conf.UpdateDataJob"/>
      <property name="repeatCount" value="1"/>
      <property name="period" value="30000"/>
      <property name="startTime" value="+0"/>
      <property name="endTime" value=""/>
    </properties-param>
  </init-params>
</component-plugin>

In which:

NameMethodTypeDescription
UpdateDataJobaddPeriodJoborg.exoplatform.services.scheduler.PeriodJobAdds an UpdateDataJob to the JobSchedulerService.

<property name="jobName" value="UpdateDataJob"/>
<property name="groupName" value="KnowledgeSuite-forum"/>
<property name="job" value="org.exoplatform.forum.service.conf.UpdateDataJob"/>
<property name="repeatCount" value="1"/>
<property name="period" value="30000"/>
<property name="startTime" value="+0"/>
<property name="endTime" value=""/>
Property namePossible valueDefault valueDescription
jobname String UpdateDataJob The name of job which will be executed.
groupname String KnowledgeSuite-forum The name of application which will be executed.
job Class path org.exoplatform.forum.service.conf.UpdateDataJobThe reference function of job which will be executed.
repeatCount Long 1The number of times the job is repeated. If repeatCount is set to 1, RecountActiveUserJob is called at runtime only without repeating. If the number is set to 2 or 3, RecountActiveUserJob will be called two or three times.
period Long 30000 (millisecond) (equal to two hours)The interval time to execute the job.
starttime Integer 0 The start time when the function executes. The starttime is 0, meaning that the time to start executing RecountActiveUserJob is the runtime.
endtime Integer nullThe end time when the function stops executing. The endtime is blank, meaning that there is no limitation for the end time for UpdateDataJob.

With start and end time, you can give a specific date in the yyyy-mm-dd HH:mm:ss.sss format to define the start and end time for UpdateDataJob.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus