Пример #1
0
 def send_update(self, rule, value, time_delta=None):
     if time_delta is None:
         time_delta = timedelta()
     subscription = rule.query_subscriptions.get()
     processor = SubscriptionProcessor(subscription)
     message = self.build_subscription_update(subscription, value=value, time_delta=time_delta)
     processor.process_update(message)
     return processor
Пример #2
0
 def send_update(self, rule, value, time_delta=None, subscription=None):
     if time_delta is None:
         time_delta = timedelta()
     if subscription is None:
         subscription = self.sub
     processor = SubscriptionProcessor(subscription)
     message = self.build_subscription_update(subscription, value=value, time_delta=time_delta)
     processor.process_update(message)
     return processor
 def send_update(self, rule, value, time_delta=None, subscription=None):
     self.email_action_handler.reset_mock()
     if time_delta is None:
         time_delta = timedelta()
     if subscription is None:
         subscription = self.sub
     processor = SubscriptionProcessor(subscription)
     message = self.build_subscription_update(subscription, value=value, time_delta=time_delta)
     with self.feature(["organizations:incidents", "organizations:performance-view"]):
         processor.process_update(message)
     return processor