from alerttask import AlertTask


class DeadmanAlertTask(AlertTask):
    def __init__(self):
        self.deadman = True

    def executeSearchEventsSimple(self):
        # We override this method to specify the size as 1
        # since we only care about if ANY events are found or not
        return self.main_query.execute(self.es, indices=self.event_indices, size=1)

from alerttask import AlertTask


class DeadmanAlertTask(AlertTask):

    def executeSearchEventsSimple(self):
        # We override this method to specify the size as 1
        # since we only care about if ANY events are found or not
        return self.main_query.execute(self.es, indices=self.event_indices, size=1)

Remove deadman alerttask init method
Remove deadman alerttask init method

  from alerttask import AlertTask
  
  
  class DeadmanAlertTask(AlertTask):
-     def __init__(self):
-         self.deadman = True
  
      def executeSearchEventsSimple(self):
          # We override this method to specify the size as 1
          # since we only care about if ANY events are found or not
          return self.main_query.execute(self.es, indices=self.event_indices, size=1)
  
Remove deadman alerttask init method
## Code Before:
from alerttask import AlertTask


class DeadmanAlertTask(AlertTask):
    def __init__(self):
        self.deadman = True

    def executeSearchEventsSimple(self):
        # We override this method to specify the size as 1
        # since we only care about if ANY events are found or not
        return self.main_query.execute(self.es, indices=self.event_indices, size=1)

## Instruction:
Remove deadman alerttask init method
## Code After:
from alerttask import AlertTask


class DeadmanAlertTask(AlertTask):

    def executeSearchEventsSimple(self):
        # We override this method to specify the size as 1
        # since we only care about if ANY events are found or not
        return self.main_query.execute(self.es, indices=self.event_indices, size=1)
