Allow Monitor.get_query_parameters to override defaults

This commit is contained in:
allegroai 2021-12-08 11:41:29 +02:00
parent a06fcfef17
commit 0366b3d3df

View File

@ -91,15 +91,14 @@ class Monitor(object):
timestamp = time() timestamp = time()
try: try:
# retrieve experiments orders by last update time # retrieve experiments orders by last update time
task_filter = self.get_query_parameters() task_filter = {
task_filter.update(
{
'page_size': 100, 'page_size': 100,
'page': 0, 'page': 0,
'status_changed': ['>{}'.format(datetime.utcfromtimestamp(previous_timestamp)), ], 'status_changed': ['>{}'.format(datetime.utcfromtimestamp(previous_timestamp)), ],
'project': self._get_projects_ids(), '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) queried_tasks = Task.get_tasks(task_name=self._task_name_filter, task_filter=task_filter)
except Exception as ex: except Exception as ex:
# do not update the previous timestamp # do not update the previous timestamp