File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -534,6 +534,15 @@ public function process_queue($verbose = false) {
534
534
535
535
// While we are not exceeding the maxcron time, and the queue is not empty.
536
536
while ($ hastime ) {
537
+
538
+ if (\core \local \cli \shutdown::should_gracefully_exit () ||
539
+ \core \task \manager::static_caches_cleared_since ($ cronstart )) {
540
+ if ($ verbose ) {
541
+ echo "Shutting down crawler early \n" ;
542
+ }
543
+ return true ;
544
+ }
545
+
537
546
if (empty ($ nodes )) {
538
547
// Grab a list of items from the front of the queue. We need the first 1000
539
548
// in case other workers are already locked and processing items at the front of the queue.
Original file line number Diff line number Diff line change 52
52
die ();
53
53
}
54
54
55
+ \core \local \cli \shutdown::script_supports_graceful_exit ();
56
+
55
57
tool_crawler_crawl ($ options ['verbose ' ]);
56
58
You can’t perform that action at this time.
0 commit comments