File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,14 @@ def process_active(watched_files)
71
71
logger . trace ( __method__ . to_s )
72
72
# Handles watched_files in the active state.
73
73
watched_files . each do |watched_file |
74
- next unless watched_file . active?
74
+ unless watched_file . active?
75
+ if @settings . exit_after_read and watched_file . all_read?
76
+ # in-active files that have been read completly in a previous run
77
+ # need to be marked as such or the pipeline will not end
78
+ common_detach_when_allread ( watched_file )
79
+ end
80
+ next
81
+ end
75
82
76
83
begin
77
84
restat ( watched_file )
@@ -99,7 +106,7 @@ def process_active(watched_files)
99
106
100
107
def common_detach_when_allread ( watched_file )
101
108
watched_file . unwatch
102
- watched_file . listener . reading_completed
109
+ watched_file . listener . reading_completed unless watched_file . listener . nil?
103
110
add_deletable_path watched_file . path
104
111
logger . trace? && logger . trace ( "whole file read, removing from collection" , :path => watched_file . path )
105
112
end
You can’t perform that action at this time.
0 commit comments