Changeset 7157


Ignore:
Timestamp:
May 24, 2016, 2:47:59 PM (5 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2010: The job progress reporter should allow progress reports more often

The original idea with a timer seemed a bit too complex to implement. It would have been easy enough to start the timer, but there is no immediate hook to stop it.

Instead, the limitations has been relaxed a bit so that only 1% difference or 2 seconds is needed for an update to occur.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Job.java

    r7120 r7157  
    17031703      Number of miliseconds between updates to the database.
    17041704    */
    1705     private static final long UPDATE_INTERVAL = 5 * 1000;
     1705    private static final long UPDATE_INTERVAL = 2 * 1000;
    17061706
    17071707    /**
    17081708      Min percentage difference between updates to the database.
    17091709    */
    1710     private static final int UPDATE_PERCENT = 5;
     1710    private static final int UPDATE_PERCENT = 1;
    17111711   
    17121712    private final SessionControl sc;
     
    17451745      // * some time has passed
    17461746      // * the plug-in has finished (percent == 100)
    1747       // * progress has increased by at least 5%
     1747      // * progress has increased by at least 1%
    17481748      if (System.currentTimeMillis() - lastUpdate >= UPDATE_INTERVAL ||
    17491749          percent == 100 || percent - lastValue >= UPDATE_PERCENT)
Note: See TracChangeset for help on using the changeset viewer.