3 Replies Latest reply on Oct 24, 2016 11:18 AM by cfang

    Purge execution tables

    richardmoore

      Now that we have the framework running standalone we need to clean up the tables. I tried running the PurgeBatchlet with the following but nothing seems to happen -

       

      <batchlet ref="org.jberet.repository.PurgeBatchlet">

      <properties>

      <property name="jobExecutionEndTimeTo" value="10/21/2016 12:24 PM" />

      </properties>

      </batchlet>

       

      What am I doing wrong?

        • 1. Re: Purge execution tables
          cfang

          can you also add another batch property: jobExecutionEndTimeFrom

           

          when these 2 properties are used together, they should form a range for selecting job executions.

          • 2. Re: Purge execution tables
            richardmoore

            <batchlet ref="org.jberet.repository.PurgeBatchlet">

              <properties>

              <property name="jobExecutionEndTimeFrom" value="01/01/2016 12:00 AM" />

              <property name="jobExecutionEndTimeTo" value="10/21/2016 12:24 PM" />

              </properties>

              </batchlet>

             

            Still no rows deleted.

            • 3. Re: Purge execution tables
              cfang

              [JBERET-130] Implement ways to purge JdbcRepository - JBoss Issue Tracker

               

              See the above issue for more details how PurgeBatchlet is implemented for jdbc job repository.

               

              for jdbc job repository, you will need to specify sql  or sqlFile properties to clear job execution data that is not in memory.

               

              The reason for the 2-step approach is that, we don't want to bring those job execution data in memory just to purge them.  It's more efficient to pass to the db to do it.