92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# File 'lib/content_server/server.rb', line 92
def flush_content_data
Log.debug1('Start flush local content data to file.')
$testing_memory_log.info('Start flush content data to file') if $testing_memory_active
$local_content_data_lock.synchronize{
local_content_data_unique_id = $local_content_data.unique_id
if (local_content_data_unique_id != $last_content_data_id)
$last_content_data_id = local_content_data_unique_id
$local_content_data.to_file($tmp_content_data_file)
File.rename($tmp_content_data_file, Params['local_content_data_path'])
Log.debug1('End flush local content data to file.')
$testing_memory_log.info('End flush content data to file') if $testing_memory_active
else
Log.debug1('no need to flush. content data has not changed')
$testing_memory_log.info('no need to flush. content data has not changed') if $testing_memory_active
end
}
end
|