conrad-blucher-institute / semaphore

Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

SemaphoreRunner always returns zero even when a run terminates due to error #428

Open lovelysandlonelys opened 1 month ago

lovelysandlonelys commented 1 month ago

when we run run into an error we should exit(1)?

matdenkas commented 1 month ago

When a process concludes, child or root, it is required to provide a integer value. A value of zero denotes successful or clean conclusion, while any other number denotes something went wrong. The non-zero number becomes the error number that is up to the user to decide what that means. So for instance if we conclude because of a runtime error we could exit 1, but if we failed to make the prediction because of missing data we could exit 2. This isn't super important as nothing is looking at how semaphore is exiting currently, but it could be useful for monitoring in the future and I feel is just a better practice.