Class: Delayed::Master::FileReopener

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/master/file_reopener.rb

Class Method Summary collapse

Class Method Details

.reopenObject



7
8
9
10
11
12
13
14
# File 'lib/delayed/master/file_reopener.rb', line 7

def reopen
  ObjectSpace.each_object(File) do |file|
    next if file.closed? || !file.sync
    file.reopen file.path, 'a+'
    file.sync = true
    file.flush
  end
end