-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to pass an exit code when stopping the application #203
Comments
would |
We could either introduce a new type of exception or replace by
so we can throw such an exception with a custom code |
Actually it might be better to introduce a new exception type, because in such cases of allowed stops, we do not need to print the full exception. Our use case is that we have empty imports in some cases - which are okay - and we do not need to generate an artefact. That's why we simply need to stop the process. |
I think it would be nice to be able to pass an exit code to |
I image it something like this:
|
Made some pull requests to have something to discuss, but we should also avoid the rollback on finish. Or we find another way to exit the app if nothing is to do, for example with a series of return statements? @DanieliMi |
I think this is a better approach here - so we do not need a PR to the Pacemaker-Core We define a new LocalFinishedException()
|
I don't think this will work because after this there will be following operations executed which will result in Exceptions in this case so we have to stop the whole application. |
true, understood |
@wagnert what do you think? We have process chains which should be stopped if initial jobs do not produce output, but this should have a success exit-code. Currently we use |
…when-stopping-application Refactoring for issue #203
Currently the exit code is always 1 when calling
\TechDivision\Import\ApplicationInterface::stop
. It would be nice to have an option to stop the application with exit code 0.The text was updated successfully, but these errors were encountered: