mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-24 11:59:09 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -85,7 +85,7 @@ class CallQueuedHandler
|
||||
*/
|
||||
protected function setJobInstanceIfNecessary(Job $job, $instance)
|
||||
{
|
||||
if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) {
|
||||
if (in_array(InteractsWithQueue::class, class_uses_recursive($instance))) {
|
||||
$instance->setJob($job);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class SqsConnector implements ConnectorInterface
|
||||
$config = $this->getDefaultConfiguration($config);
|
||||
|
||||
if ($config['key'] && $config['secret']) {
|
||||
$config['credentials'] = Arr::only($config, ['key', 'secret']);
|
||||
$config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
|
||||
}
|
||||
|
||||
return new SqsQueue(
|
||||
|
||||
@@ -222,7 +222,7 @@ class Listener
|
||||
*/
|
||||
public function memoryExceeded($memoryLimit)
|
||||
{
|
||||
return (memory_get_usage() / 1024 / 1024) >= $memoryLimit;
|
||||
return (memory_get_usage(true) / 1024 / 1024) >= $memoryLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -162,7 +162,11 @@ class RedisQueue extends Queue implements QueueContract
|
||||
{
|
||||
$this->migrate($prefixed = $this->getQueue($queue));
|
||||
|
||||
list($job, $reserved) = $this->retrieveNextJob($prefixed);
|
||||
if (empty($nextJob = $this->retrieveNextJob($prefixed))) {
|
||||
return;
|
||||
}
|
||||
|
||||
list($job, $reserved) = $nextJob;
|
||||
|
||||
if ($reserved) {
|
||||
return new RedisJob(
|
||||
|
||||
@@ -251,10 +251,14 @@ class Worker
|
||||
$this->exceptions->report($e);
|
||||
|
||||
$this->stopWorkerIfLostConnection($e);
|
||||
|
||||
$this->sleep(1);
|
||||
} catch (Throwable $e) {
|
||||
$this->exceptions->report($e = new FatalThrowableError($e));
|
||||
|
||||
$this->stopWorkerIfLostConnection($e);
|
||||
|
||||
$this->sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,7 +545,7 @@ class Worker
|
||||
*/
|
||||
public function memoryExceeded($memoryLimit)
|
||||
{
|
||||
return (memory_get_usage() / 1024 / 1024) >= $memoryLimit;
|
||||
return (memory_get_usage(true) / 1024 / 1024) >= $memoryLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user