alter way of alerting info of empty task (#2094)
### What problem does this PR solve? #2043 ### Type of change - [x] Refactoring
This commit is contained in:
parent
a6d85c6c2f
commit
e9202999cb
1 changed files with 4 additions and 1 deletions
|
|
@ -118,7 +118,10 @@ def collect():
|
||||||
cron_logger.info("Task {} has been canceled.".format(msg["id"]))
|
cron_logger.info("Task {} has been canceled.".format(msg["id"]))
|
||||||
return pd.DataFrame()
|
return pd.DataFrame()
|
||||||
tasks = TaskService.get_tasks(msg["id"])
|
tasks = TaskService.get_tasks(msg["id"])
|
||||||
assert tasks, "{} empty task!".format(msg["id"])
|
if not tasks:
|
||||||
|
cron_logger.warn("{} empty task!".format(msg["id"]))
|
||||||
|
return []
|
||||||
|
|
||||||
tasks = pd.DataFrame(tasks)
|
tasks = pd.DataFrame(tasks)
|
||||||
if msg.get("type", "") == "raptor":
|
if msg.get("type", "") == "raptor":
|
||||||
tasks["task_type"] = "raptor"
|
tasks["task_type"] = "raptor"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue