class_docstr: Base class for monitoring Tasks on the system.
  Inherit to implement specific logic
class_docstr_tok: ["Base","class","for","monitoring","Tasks","on","the","system",".","Inherit","to","implement","specific","logic"]
docstr: Implement the main query / interface of the monitor class.
  In order to combine multiple Monitor objects, call `monitor_step` manually.
  If Tasks are detected in this call,
  
  :return: None
docstr_tok: ["Implement","the","main","query","\/","interface","of","the","monitor","class",".","In","order","to","combine","multiple","Monitor","objects",",","call","`","monitor_step","`","manually",".","If","Tasks","are","detected","in","this","call",",",":","return",":","None"]
code: def monitor_step(self):
      # type: () -> ()
      """
      Implement the main query / interface of the monitor class.
      In order to combine multiple Monitor objects, call `monitor_step` manually.
      If Tasks are detected in this call,
  
      :return: None
      """
      previous_timestamp = self._previous_timestamp or time()
      timestamp = time()
      try:
          # retrieve experiments orders by last update time
          task_filter = {
              "page_size": 100,
              "page": 0,
              "status_changed": [
                  ">{}".format(
                      datetime.utcfromtimestamp(previous_timestamp)
                  ),
              ],
              "project": self._get_projects_ids(),
          }
          task_filter.update(self.get_query_parameters())
  
          queried_tasks = Task.get_tasks(
              task_name=self._task_name_filter, task_filter=task_filter
          )
      except Exception as ex:
          # do not update the previous timestamp
          print("Exception querying Tasks: {}".format(ex))
          return
  
      # process queried tasks
      for task in queried_tasks:
          try:
              self.process_task(task)
          except Exception as ex:
              print(
                  "Exception processing Task ID={}:\n{}".format(
                      task.id, ex
                  )
              )
  
      self._previous_timestamp = timestamp
  
file_path: clearml/clearml/automation/monitor.py
imports: from datetime import datetime
  from time import time, sleep
  from typing import Optional, Sequence
  from ..backend_api.session.client import APIClient
  from ..backend_interface.util import exact_match_regex
  from ..task import Task
label_desc: Use image node_id 5 for calling the Monitor obj's underlying member method code with example usage: obj.monitor_step() without return types