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

Exit early on sigint or cron shutdown #198 #199

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

brendanheywood
Copy link
Contributor

@brendanheywood brendanheywood commented Feb 5, 2025

Run these and press control c half way through and confirm they exit cleanly and quckly:

php admin/tool/crawler/cli/crawler.php 
# queue up ad hoc tasks:
php admin/cli/scheduled_task.php --execute='\tool_crawler\task\crawl_task'

# now control c half way through this:
php admin/cli/adhoc_task.php --classname='tool_crawler\task\adhoc_crawl_task'

Repeat both of above but then instead of control c, in another terminal run this, and they should exit fast:

php admin/cli/cron.php --disable

@bwalkerl
Copy link
Contributor

bwalkerl commented Feb 5, 2025

After this patch exiting with ctrl + c and disabling cron are exiting cleanly and quickly in both scenarios for me.

@brendanheywood brendanheywood merged commit 91cefe2 into MOODLE_310_STABLE Feb 5, 2025
42 checks passed
@brendanheywood brendanheywood deleted the exit-early branch February 5, 2025 08:34
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