Skip to content
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

Make sure all exit calls use ExitCodes enum #767

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

tw4l
Copy link
Member

@tw4l tw4l commented Feb 11, 2025

Quick follow-up to #584 to make sure enum is used everywhere.

I debated modifying create-login-profile.ts's handleTerminate method to return ExitCodes.SignalInterrupted or ExitCodes.SignalInterruptedForce depending on the signal received, but I'm not sure that's actually helpful in the case of profiles and the behavior doesn't match exactly what's documented for the crawler, so left that as-is as a ExitCodes.GenericError.

@tw4l tw4l requested a review from ikreymer February 11, 2025 17:44
@ikreymer
Copy link
Member

ikreymer commented Feb 11, 2025

I debated modifying create-login-profile.ts's handleTerminate method to return ExitCodes.SignalInterrupted or ExitCodes.SignalInterruptedForce depending on the signal received, but I'm not sure that's actually helpful in the case of profiles and the behavior doesn't match exactly what's documented for the crawler, so left that as-is as a ExitCodes.GenericError.

Yeah, I could go either way on that, since its not interrupting a crawl, it doesn't make too much of a difference, could set it to that to indicate interrupt vs some other random error..

Edit: I guess ExitCodes.SignalInterrupted might make most sense, since it quickly exists on first signal.

@tw4l
Copy link
Member Author

tw4l commented Feb 11, 2025

Edit: I guess ExitCodes.SignalInterrupted might make most sense, since it quickly exists on first signal.

Makes sense to me, went ahead and made that change.

@ikreymer ikreymer merged commit f16be32 into main Feb 11, 2025
4 checks passed
@ikreymer ikreymer deleted the issue-584-exit-code-followup branch February 11, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants