lib/splash/processes.rb in prometheus-splash-0.8.3 vs lib/splash/processes.rb in prometheus-splash-0.8.4
- old
+ new
@@ -50,9 +50,13 @@
def initialize(name)
@name = name
@backend = get_backend :process_trace
end
+ def clear
+ @backend.del({:key => @name}) if @backend.exist?({key: @name})
+ end
+
def purge(retention)
retention = {} if retention.nil?
if retention.include? :hours then
adjusted_datetime = DateTime.now - retention[:hours].to_f / 24
elsif retention.include? :hours then