lib/crono_trigger/schedulable.rb in crono_trigger-0.8.1 vs lib/crono_trigger/schedulable.rb in crono_trigger-0.8.3
- old
+ new
@@ -79,9 +79,15 @@
end
end
return [records, maybe_has_next] if records.size == limit
end
+
+ [records, maybe_has_next]
+ rescue => e
+ raise if records.empty?
+
+ logger&.warn("Failed to fetching some records but continue processing records: #{e} (#{e.class})")
[records, maybe_has_next]
end
def crono_trigger_column_name(name)
crono_trigger_options["#{name}_column_name".to_sym].try(:to_s) || name.to_s