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)
8585 $ this ->addMessage ($ msg );
8686
8787 $ this ->maybeStopConsumer ();
88-
89- if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
90- $ this ->stopConsuming ();
91- }
9288 }
9389
9490 public function consume ()
@@ -189,10 +185,6 @@ protected function handleProcessMessages($processFlags = null)
189185
190186 $ this ->consumed ++;
191187 $ this ->maybeStopConsumer ();
192-
193- if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
194- $ this ->stopConsuming ();
195- }
196188 }
197189
198190 /**
@@ -390,6 +382,10 @@ protected function maybeStopConsumer()
390382 if ($ this ->forceStop ) {
391383 $ this ->stopConsuming ();
392384 }
385+
386+ if (null !== $ this ->getMemoryLimit () && $ this ->isRamAlmostOverloaded ()) {
387+ $ this ->stopConsuming ();
388+ }
393389 }
394390
395391 /**
You can’t perform that action at this time.
0 commit comments