In some environments the Model.reset_column_information is not reflected to threads. So an import error message appears. Reset needed model column information for each thread.
This commit is contained in:
parent
f7ba0a2865
commit
94debbfe4b
1 changed files with 9 additions and 0 deletions
|
@ -83,6 +83,11 @@ module Import
|
|||
|
||||
threads[thread] = Thread.new {
|
||||
|
||||
# In some environments the Model.reset_column_information
|
||||
# is not reflected to threads. So an import error message appears.
|
||||
# Reset needed model column information for each thread.
|
||||
reset_database_information
|
||||
|
||||
Thread.current[:thread_no] = thread
|
||||
Thread.current[:loop_count] = 0
|
||||
|
||||
|
@ -163,5 +168,9 @@ module Import
|
|||
def customer_user
|
||||
limit_import('CustomerUser', limit: 50)
|
||||
end
|
||||
|
||||
def reset_database_information
|
||||
::Ticket.reset_column_information
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue