lib/Models/ReviewFetcher.rb in ZReviewTender-1.3.4 vs lib/Models/ReviewFetcher.rb in ZReviewTender-1.3.5
- old
+ new
@@ -29,9 +29,20 @@
if !slackProcessor.nil?
slackProcessor.sendWelcomMessage(platform)
end
end
+ def setSentWelcomeMessage()
+ basePath = "#{config.baseExecutePath}/latestCheckTimestamp/"
+ Helper.createDirIfNotExist(basePath)
+ File.open("#{basePath}/#{platform}Welcome", 'w') { |file| file.write("") }
+ end
+
+ def isSentWelcomeMessage()
+ filePath = "#{config.baseExecutePath}/latestCheckTimestamp/#{platform}Welcome"
+ return File.exists?(filePath)
+ end
+
def setPlatformLatestCheckTimestamp(timestamp)
basePath = "#{config.baseExecutePath}/latestCheckTimestamp/"
Helper.createDirIfNotExist(basePath)
File.open("#{basePath}/#{platform}", 'w') { |file| file.write(timestamp) }
end
\ No newline at end of file