WSL/SLF GitLab Repository

Skip to content
Snippets Groups Projects
Commit 15b2e001 authored by simpalk's avatar simpalk
Browse files

MCHEX-3 change format from csv to DAT

parent 68116782
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ object FtpConnector {
channel.connect()
val sftpChannel = channel.asInstanceOf[ChannelSftp]
sftpChannel.cd(pathForFtpFolder)
val file = new File(fileName + ".csv")
val file = new File(fileName + ".DAT")
Logger.info(s"Empty file before moving to ftp: ${file.getAbsolutePath}")
val pw = new PrintWriter(file)
pw.write(dataToWrite.mkString("\n"))
......@@ -53,7 +53,7 @@ object FtpConnector {
sftpChannel.put(newFileStream, file.getName)
sftpChannel.exit()
session.disconnect()
val srcFile = FileUtils.getFile(fileName + ".csv")
val srcFile = FileUtils.getFile(fileName + ".DAT")
val destFile = FileUtils.getFile(pathForLocalWrittenFiles)
newFileStream.close()
FileUtils.moveFileToDirectory(srcFile, destFile, true)
......
......@@ -31,7 +31,7 @@ class LogsSchedulerActor @Inject()(configuration: Configuration)(implicit ec: Ex
if(source.exists()) {
Logger.info(s"Source File Exist: ${source.getAbsolutePath}")
if (source.getName.endsWith(".gz") || source.getName.endsWith(".csv")) {
if (source.getName.endsWith(".gz") || source.getName.endsWith(".DAT")) {
val diff = new java.util.Date().getTime - source.lastModified
Logger.info(s"Time difference from now and File modified : ${source.getAbsolutePath}")
if (diff > 1 * 24 * 60 * 60 * 1000) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment