Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化agv和ftp
This commit is contained in:
@@ -21,6 +21,16 @@ class FtpController():
|
||||
except Exception:
|
||||
logging.info("ftp连接失败")
|
||||
|
||||
def file_exists(self, path):
|
||||
# 检查文件是否存在于FTP服务器上
|
||||
try:
|
||||
self.ftp.cwd(os.path.dirname(path))
|
||||
files = self.ftp.nlst()
|
||||
return os.path.basename(path) in files
|
||||
except Exception as e:
|
||||
logging.error(f"Error checking file: {e}")
|
||||
return False
|
||||
|
||||
# 下载目录下的文件
|
||||
def download_file_tree(self, target_dir, serverdir):
|
||||
if not os.path.exists(serverdir):
|
||||
|
||||
@@ -52,8 +52,6 @@ class MrStaticResourceDataSync(models.Model):
|
||||
logging.info("夹具型号已每日同步成功")
|
||||
self.env['sf.fixture.materials.basic.parameters'].sync_fixture_materials_basic_parameters_yesterday()
|
||||
logging.info("夹具型号基本参数已每日同步成功")
|
||||
self.env['sf.functional.fixture.type'].sync_fixture_materials_basic_parameters_yesterday()
|
||||
logging.info("夹具型号基本参数已每日同步成功")
|
||||
self.env['sf.functional.fixture.type'].sync_functional_fixture_type_yesterday()
|
||||
logging.info("功能夹具类型已每日同步成功")
|
||||
self.env['sf.cutting.tool.material'].sync_cutting_tool_material_yesterday()
|
||||
|
||||
Reference in New Issue
Block a user