lib/embulk/input/zendesk/plugin.rb in embulk-input-zendesk-0.2.12 vs lib/embulk/input/zendesk/plugin.rb in embulk-input-zendesk-0.2.13
- old
+ new
@@ -92,10 +92,11 @@
access_token: config.param("access_token", :string, default: nil),
start_time: config.param("start_time", :string, default: nil),
retry_limit: config.param("retry_limit", :integer, default: 5),
retry_initial_wait_sec: config.param("retry_initial_wait_sec", :integer, default: 4),
incremental: config.param("incremental", :bool, default: true),
+ dedup: config.param("dedup", :bool, default: true),
schema: config.param(:columns, :array, default: []),
includes: config.param(:includes, :array, default: []),
app_marketplace_integration_name: config.param("app_marketplace_integration_name", :string, default: nil),
app_marketplace_org_id: config.param("app_marketplace_org_id", :string, default: nil),
app_marketplace_app_id: config.param("app_marketplace_app_id", :string, default: nil)
@@ -107,11 +108,14 @@
end
def run
method = task[:target]
args = [preview?]
- if @start_time
- args << @start_time.to_i
+ args << (@start_time || 0).to_i
+
+ # de-dup may lead to OOM
+ if !task[:dedup].nil? && !task[:dedup]
+ args << false
end
mutex = Mutex.new
fetching_start_at = Time.now
last_data = client.public_send(method, *args) do |record|