Merge branch 'develop' of git.znuny.com:zammad/zammad into develop
This commit is contained in:
commit
122c7167b1
2 changed files with 6 additions and 2 deletions
|
@ -262,7 +262,7 @@ class Sequencer
|
||||||
remove = !attribute.will_be_used?
|
remove = !attribute.will_be_used?
|
||||||
remove ||= attribute.to <= @index
|
remove ||= attribute.to <= @index
|
||||||
if remove && attribute.will_be_used?
|
if remove && attribute.will_be_used?
|
||||||
logger.debug("Removing unneeded attribute '#{identifier}': #{@values[identifier]}")
|
logger.debug("Removing unneeded attribute '#{identifier}': #{@values[identifier].inspect}")
|
||||||
end
|
end
|
||||||
remove
|
remove
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,8 +23,12 @@ class Sequencer
|
||||||
|
|
||||||
def store?
|
def store?
|
||||||
return true if import_job.updated_at.blank?
|
return true if import_job.updated_at.blank?
|
||||||
|
next_update_at < Time.zone.now
|
||||||
|
end
|
||||||
|
|
||||||
|
def next_update_at
|
||||||
# update every 10 seconds to reduce DB load
|
# update every 10 seconds to reduce DB load
|
||||||
import_job.updated_at > Time.zone.now + 10.seconds
|
import_job.updated_at + 10.seconds
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue