ai_invest/backend/airflow/dags/plugins/utils/status_enum.py

16 lines
319 B
Python

class StatusEnum:
@staticmethod
def status_enum(status: str):
if status == 'WAIT':
return 1
elif status == 'RUNNING':
return 2
elif status == 'FAIL':
return 3
elif status == 'SUCCESS':
return 4
else:
return 0