public long getMinimumTimeBetweenQueries() {
   return RE3Properties.getLong("billboard_artist_minimum_query_interval_days")
       * 1000
       * 60
       * 60
       * 24;
 }
public class TagUpdateTask extends CommonTask {

  private static Logger log = Logger.getLogger(TagUpdateTask.class);
  private static final long serialVersionUID = 0L;

  private static long TAG_UPDATE_TASK_SLEEP_INTERVAL =
      RE3Properties.getLong("tag_update_task_sleep_interval_millis");

  public TagUpdateTask() {}

  public void execute() {
    try {
      if (log.isTraceEnabled()) log.trace("execute(): updating invalidated tags...");
      for (int tagId : Database.getTagIndex().getIds()) {
        TagRecord tag = Database.getTagIndex().getTagRecord(tagId);
        if ((tag != null) && tag.needsUpdate()) tag.update();
        if (RapidEvolution3.isTerminated || isCancelled()) return;
      }
    } catch (Exception e) {
      log.error("run(): error", e);
    } finally {
      if (!RapidEvolution3.isTerminated)
        SandmanThread.putForegroundTaskToSleep(this, TAG_UPDATE_TASK_SLEEP_INTERVAL);
    }
  }

  public int getTaskPriority() {
    return Task.DEFAULT_TASK_PRIORITY;
  }

  public Object getResult() {
    return null;
  }

  public String toString() {
    return "Tag tree refresher task";
  }

  public boolean isIndefiniteTask() {
    return true;
  }
}