Commit 3e8f03c5 authored by Roque's avatar Roque

Error message removed for no-error scenarios

parent b6c537b3
......@@ -10,6 +10,7 @@ DATASET_REPORT_FILE_NAME="/.dataset-task-report"
DATASET_COMPLETE_FILE_NAME="/.dataset-completed"
DISCARD_CHANGES_FILE_NAME="/.discard-changes"
LOG_DIR="$EBULK_DATA_PATH/logs"
STATUS_FILE="$EBULK_DATA_PATH/.status"
CREDENTIALS_FILE="$EBULK_DATA_PATH/.credentials"
CONFIG_FILE="$EBULK_DATA_PATH/.config"
DESCRIPTION_DATASET_PATH_PREFIX="$EBULK_DATA_PATH/.dataset-description"
......@@ -300,6 +301,7 @@ function runProcess {
fi
$embulk run -I $TOOL_PATH/embulk-wendelin-dataset-tool/lib $FILE $DIFF_COMMAND 2> "$LOG_DIR/error.log" || {
if [ "$STATUS" == \"\" ] ; then
if [ ! -f $STATUS_FILE ]; then
if [ "$DATASET_DESCRIPTION" == "" ] ; then
echo
echo -e "${ORANGE}[ERROR] Embulk tool stopped its execution.${NC}"
......@@ -310,13 +312,14 @@ function runProcess {
echo "[INFO] Please check the logs in '$LOG_DIR' directory for more details."
echo
fi
fi
fi
}
}
function javaNotInstalled {
echo -e "${ORANGE}[ERROR] java 8 must be installed. Please, install java 8 and try again.${NC}"
echo "[INFO] You can download the installation package for your operative system clicking on the Download button on https://java.com/en/"
echo "[INFO] You can download the installation package for your operative system clicking on the Download button on https://java.com/en/"
echo "[INFO] Please follow the instructions to install java 8 here https://java.com/en/download/help/download_options.xml"
echo
}
......
......@@ -7,15 +7,20 @@ class LogManager
INFO = "INFO"
ERROR = "ERROR"
WARN = "WARNING"
STATUS_FILE = ".status"
def initialize()
now = Time.now.strftime("%d-%m-%Y")
@filename = "#{now.to_s}.log"
@user
@password
@status_file = "./"
File.delete(@status_file + STATUS_FILE) if File.exist?(@status_file + STATUS_FILE)
end
def setFilename(tool_dir, prefix)
@status_file = tool_dir + "/"
File.delete(@status_file + STATUS_FILE) if File.exist?(@status_file + STATUS_FILE)
log_dir = "#{tool_dir}/logs/"
if not File.directory?(log_dir)
Dir.mkdir log_dir
......@@ -55,9 +60,11 @@ class LogManager
puts
unless @path.nil?
puts "PROCESS ABORTED : For more detailed information, please refer to the log file '#{@path}'"
exec("Process.kill 9, Process.pid >/dev/null 2>&1")
end
end
exec("Process.kill 9, Process.pid >/dev/null 2>&1")
File.open(@status_file + STATUS_FILE, 'w')
exit!
end
def logOutOfMemoryError(reference)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment