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

Crawlee clean exit (migration/graceful abort/pause) on Ctrl+C does not work well with CLI #631

Open
mvolfik opened this issue Sep 4, 2024 · 0 comments
Labels
t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@mvolfik
Copy link
Collaborator

mvolfik commented Sep 4, 2024

when I press Ctrl+C, new versions of crawlee pause the scraper, letting the requests finish cleanly (like with a graceful abort on Platform). However, the outer process of the CLI (apify run) exits, so I get the shell prompt, but then some extra output lines are written, leaving a mess in my terminal

image

Linux Mint, fish-shell 3.7.1, apify-cli/0.20.6 node-v20.5.1

when I run the scraper with npm run start, it works correctly - the Crawlee clean exit happens, and only after that the shell prompt is shown in my terminal. I think issue is with this SIGINT handler in CLI.

Process three when the scraper is running:

image

Process tree after Ctrl+C, before the scraper finishes - notice the whole thing is no longer under the terminal/shell at all.

image

(originally Slack thread https://apify.slack.com/archives/CD0SF6KD4/p1725443996011839 , everything important from there is copied above)

@fnesveda fnesveda added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

2 participants