--- src/dbomatic/dbomatic | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic index 1cd1229..7453262 100755 --- a/src/dbomatic/dbomatic +++ b/src/dbomatic/dbomatic @@ -284,7 +284,12 @@ begin
# Setup inotify watch for condor event log notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event| - parse_log_file log_file, parser + parse_log_file log_file, parser if File.exists?(CONDOR_EVENT_LOG_FILE) + } + + # the log was rotated out + notifier.watch(CONDOR_EVENT_LOG_FILE, :moved_to){ |event| + log_file.close }
# if log file doesn't exist wait until it does @@ -296,7 +301,12 @@ begin
# Setup inotify watch for condor event log notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event| - parse_log_file log_file, parser + parse_log_file log_file, parser if File.exists?(CONDOR_EVENT_LOG_FILE) + } + + # the log was rotated out + notifier.watch(CONDOR_EVENT_LOG_FILE, :moved_to){ |event| + log_file.close } end }