code: @PostConstruct
      public void init() {
          final String thumbnailPath = System.getProperty(Constants.FESS_THUMBNAIL_PATH);
          if (thumbnailPath != null) {
              baseDir = new File(thumbnailPath);
          } else {
              final String varPath = System.getProperty(Constants.FESS_VAR_PATH);
              if (varPath != null) {
                  baseDir = new File(varPath, THUMBNAILS_DIR_NAME);
              } else {
                  baseDir = ResourceUtil.getThumbnailPath().toFile();
              }
          }
          if (baseDir.mkdirs()) {
              logger.info("Created: " + baseDir.getAbsolutePath());
          }
          if (!baseDir.isDirectory()) {
              throw new FessSystemException("Not found: " + baseDir.getAbsolutePath());
          }
  
          if (logger.isDebugEnabled()) {
              logger.debug("Thumbnail Directory: " + baseDir.getAbsolutePath());
          }
  
          thumbnailTaskQueue = new LinkedBlockingQueue<>(thumbnailTaskQueueSize);
          generating = !Constants.TRUE.equalsIgnoreCase(System.getProperty("fess.thumbnail.process"));
          thumbnailQueueThread = new Thread((Runnable) () -> {
              final List<Tuple3<String, String, String>> taskList = new ArrayList<>();
              while (generating) {
                  try {
                      final Tuple3<String, String, String> task = thumbnailTaskQueue.poll(thumbnailTaskQueueTimeout, TimeUnit.MILLISECONDS);
                      if (task == null) {
                          if (!taskList.isEmpty()) {
                              storeQueue(taskList);
                          }
                      } else if (!taskList.contains(task)) {
                          taskList.add(task);
                          if (taskList.size() > thumbnailTaskBulkSize) {
                              storeQueue(taskList);
                          }
                      }
                  } catch (final InterruptedException e) {
                      if (logger.isDebugEnabled()) {
                          logger.debug("Interupted task.", e);
                      }
                  } catch (final Exception e) {
                      if (generating) {
                          logger.warn("Failed to generate thumbnail.", e);
                      }
                  }
              }
              if (!taskList.isEmpty()) {
                  storeQueue(taskList);
              }
          }, "ThumbnailGenerator");
          thumbnailQueueThread.start();
      }
docs: 24 hours