# имя: 'Outdated remover 2' # описание: удаление устаревших объектов # тип триггера: 'EgsScheduled' # создан: 2017.12.21 17.45.56, Сельченков Н.Ю. # изменен: '2018.04.16 18.52.16', Сельченков Н.Ю. # подробности: https://redmine.integra-s.com:11000/projects/eilyacuario/wiki/Outdated_remover_2 use System.Random use System.Math use typedef ` ` as Settings const settings = Settings(trigger.settings) use ("acuario2.types." + settings.type) as ItemType from acuario2.types let outdated_item(item as Item) = DateTime.UtcNow > item.LastUpdate + settings.timeout from graph.Values of type Item where (it is ItemType) and (it is outdated_item) do Deleted = true now