JGCRI / cassandra

Human-earth system multi-scale model coupling framework
Other
6 stars 3 forks source link

More informative status indicators #47

Open calebbraun opened 5 years ago

calebbraun commented 5 years ago

Let's make the component status indicator variable more helpful, so instead of 0 (not yet run), 1 (complete), and 2 (error) we could do something like add constants to constants.py, e.g.

class STATUS():
    PENDING = 0
    COMPLETE = 1
    ERROR = 2

Then something like:

from cassandra.constants import STATUS

...

if component.status == STATUS.COMPLETE:
    # do something