---
src/dbomatic/dbomatic | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 1cd1229..67b9d20 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -286,21 +286,24 @@ begin
notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
}
+ end
+
+ # if log file doesn't exist wait until it does
+ notifier.watch(condor_event_log_dir, :create){ |event|
+ if event.name == "EventLog"
+ log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ parse_log_file log_file, parser
- # if log file doesn't exist wait until it does
- else
- notifier.watch(condor_event_log_dir, :create){ |event|
- if event.name == "EventLog"
- log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ # Setup inotify watch for condor event log
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
+ }
+ end
+ }
- # Setup inotify watch for condor event log
- notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
- }
- end
- }
- end
+ notifier.watch(condor_event_log_dir, :move){ |event|
+ log_file.close if event.name == "EventLog"
+ }
while true
begin
--
1.7.2.3
Show replies by date