File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,6 @@ public function execute(AMQPMessage $msg)
85
85
$ this ->addMessage ($ msg );
86
86
87
87
$ this ->maybeStopConsumer ();
88
-
89
- if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
90
- $ this ->stopConsuming ();
91
- }
92
88
}
93
89
94
90
public function consume ()
@@ -189,10 +185,6 @@ protected function handleProcessMessages($processFlags = null)
189
185
190
186
$ this ->consumed ++;
191
187
$ this ->maybeStopConsumer ();
192
-
193
- if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
194
- $ this ->stopConsuming ();
195
- }
196
188
}
197
189
198
190
/**
@@ -390,6 +382,10 @@ protected function maybeStopConsumer()
390
382
if ($ this ->forceStop ) {
391
383
$ this ->stopConsuming ();
392
384
}
385
+
386
+ if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
387
+ $ this ->stopConsuming ();
388
+ }
393
389
}
394
390
395
391
/**
You can’t perform that action at this time.
0 commit comments