智慧保安后台管理-外网
Administrator
2022-06-10 27f24d1fe8a146a3b8256abe742b97ee92a1660c
挂载卷设置
2 files modified
23 ■■■■ changed files
docker-compose.yml 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/quartz/task/Task.java 21 ●●●● patch | view | raw | blame | history
docker-compose.yml
@@ -6,6 +6,8 @@
    image: zhbaw:latest
    ports:
      - "81:81"
    volumes:
      - /home/zhongsong/anbao/:/home/zhongsong/anbao/
    # 容器停止后会重启
    restart: always
#    depends_on:
src/main/java/org/springblade/modules/quartz/task/Task.java
@@ -121,7 +121,6 @@
            FTPFile[] files = ftp.listFiles();
            if (files.length==0){
                ftp.logout();
                return false;
            }
            else {
@@ -167,13 +166,18 @@
                    }
                }
                //关闭流
                ftp.completePendingCommand();
                ftp.logout();
//                ftp.completePendingCommand();
//                ftp.logout();
            }
        } catch (Exception e) {
            System.out.println("ftp连接失败");
            e.printStackTrace();
        } finally {
            try {
                ftp.logout();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (ftp.isConnected()) {
                try {
                    ftp.disconnect();
@@ -327,7 +331,7 @@
            FTPFile[] files = ftp.listFiles();
            //文件个数大于10个时开始处理
            if (files.length==0){
                ftp.logout();
                return false;
            }
            else {
@@ -369,13 +373,18 @@
                    }
                }
                //关闭流
                ftp.completePendingCommand();
                ftp.logout();
//                ftp.completePendingCommand();
//                ftp.logout();
            }
        } catch (Exception e) {
            System.out.println("ftp连接失败");
            e.printStackTrace();
        } finally {
            try {
                ftp.logout();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (ftp.isConnected()) {
                try {
                    ftp.disconnect();