lib/mihari/analyzers/base.rb in mihari-6.3.0 vs lib/mihari/analyzers/base.rb in mihari-7.0.0
- old
+ new
@@ -77,9 +77,25 @@
#
def call
normalized_artifacts
end
+ def result(...)
+ res = Try[StandardError] do
+ retry_on_error(
+ times: retry_times,
+ interval: retry_interval,
+ exponential_backoff: retry_exponential_backoff
+ ) do
+ call(...)
+ end
+ end
+
+ return res.recover { [] } if ignore_error?
+
+ res.to_result
+ end
+
class << self
#
# Initialize an analyzer by query params
#
# @param [Hash] params