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}"
......@@ -311,6 +313,7 @@ function runProcess {
echo
fi
fi
fi
}
}
......
......@@ -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