mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
fix: [retro_hunt] fix daterange
This commit is contained in:
parent
a382b572c6
commit
3e591d95bc
2 changed files with 8 additions and 2 deletions
|
@ -498,7 +498,10 @@ def get_all_items_objects(filters={}):
|
||||||
daterange = Date.get_daterange(date_from, date_to)
|
daterange = Date.get_daterange(date_from, date_to)
|
||||||
else:
|
else:
|
||||||
date_from = get_obj_date_first('item')
|
date_from = get_obj_date_first('item')
|
||||||
|
if date_from:
|
||||||
daterange = Date.get_daterange(date_from, Date.get_today_date_str())
|
daterange = Date.get_daterange(date_from, Date.get_today_date_str())
|
||||||
|
else:
|
||||||
|
daterange = []
|
||||||
if start_date:
|
if start_date:
|
||||||
if int(start_date) > int(date_from):
|
if int(start_date) > int(date_from):
|
||||||
i = 0
|
i = 0
|
||||||
|
|
|
@ -111,6 +111,9 @@ class Retro_Hunt_Module(AbstractModule):
|
||||||
self.redis_logger.warning(f'{self.module_name}, Retro Hunt {task_uuid} completed')
|
self.redis_logger.warning(f'{self.module_name}, Retro Hunt {task_uuid} completed')
|
||||||
|
|
||||||
def update_progress(self):
|
def update_progress(self):
|
||||||
|
if self.nb_objs == 0:
|
||||||
|
new_progress = 100
|
||||||
|
else:
|
||||||
new_progress = self.nb_done * 100 / self.nb_objs
|
new_progress = self.nb_done * 100 / self.nb_objs
|
||||||
if int(self.progress) != int(new_progress):
|
if int(self.progress) != int(new_progress):
|
||||||
print(new_progress)
|
print(new_progress)
|
||||||
|
|
Loading…
Reference in a new issue