Skip to content

Commit

Permalink
Merge pull request #162 from pjreed/157/fix-bag-scanning
Browse files Browse the repository at this point in the history
Fix AdminController scanning functions
  • Loading branch information
danthony06 authored Nov 3, 2021
2 parents 925deb0 + a23a2d7 commit e0c7fda
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Bag Database changelog

3.4.2
- Fix admin functions for forcing bag scanning

3.4.1
- Increase maximum bag file name length to 255 characters
- Don't prevent adding bags if the bag removal task fails
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.github.swri-robotics</groupId>
<artifactId>bag-database</artifactId>
<packaging>war</packaging>
<version>3.4.1</version>
<version>3.4.2</version>
<name>Bag Database</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import com.github.swrirobotics.remote.GeocodingService;
import com.github.swrirobotics.status.Status;
import com.github.swrirobotics.status.StatusProvider;
import com.google.common.base.Joiner;
import com.google.common.collect.Maps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -118,6 +119,7 @@ public void initialize() {
myBagService.deleteUnownedBags();

for (BagStorage storage : storages) {
myBagStorages.put(storage.getStorageId(), storage);
storage.addChangeListener(this);
scanStorage(storage, false);
}
Expand Down Expand Up @@ -340,6 +342,7 @@ public void updateAllTags() {
}

public void scanAllStorages(boolean forceUpdate) {
myLogger.info("Scanning all storage backends: " + Joiner.on(',').join(myBagStorages.keySet()));
for (BagStorage storage : myBagStorages.values()) {
scanStorage(storage, forceUpdate);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import com.github.swrirobotics.bags.storage.*;
import com.github.swrirobotics.bags.storage.filesystem.watcher.DefaultRecursiveWatcher;
import com.github.swrirobotics.bags.storage.filesystem.watcher.RecursiveWatcher;
import com.github.swrirobotics.config.ConfigService;
import com.github.swrirobotics.persistence.Bag;
import com.github.swrirobotics.persistence.BagRepository;
import com.github.swrirobotics.status.Status;
Expand Down Expand Up @@ -70,7 +69,6 @@ public class FilesystemBagStorageImpl extends StatusProvider implements BagStora

private final ApplicationContext applicationContext;
private final BagRepository bagRepository;
private final ConfigService configService;
private BagService bagService;

private final DirectoryStream.Filter<Path> myDirFilter = path -> path.toFile().isDirectory();
Expand All @@ -79,11 +77,9 @@ public class FilesystemBagStorageImpl extends StatusProvider implements BagStora
private RecursiveWatcher myWatcher = null;


public FilesystemBagStorageImpl(ApplicationContext applicationContext, BagRepository bagRepository,
ConfigService configService) {
public FilesystemBagStorageImpl(ApplicationContext applicationContext, BagRepository bagRepository) {
this.applicationContext = applicationContext;
this.bagRepository = bagRepository;
this.configService = configService;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/views/AboutWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Ext.define('BagDatabase.views.AboutWindow', {
layout: 'fit',
bodyPadding: 5,
constrainHeader: true,
html: "<h2>Bag Database 3.4.1</h2>" +
html: "<h2>Bag Database 3.4.2</h2>" +
"<p>Documentation: <a href='https://swri-robotics.github.io/bag-database/'>https://swri-robotics.github.io/bag-database/</a></p>" +
"<p>Source Code: <a href='https://github.com/swri-robotics/bag-database'>https://github.com/swri-robotics/bag-database</a></p>" +
"<p>Copyright 2015-2020 Southwest Research Institute</p>" +
Expand Down

0 comments on commit e0c7fda

Please sign in to comment.