ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -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);
}

View File

@@ -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(

View File

@@ -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;
}
/**

View File

@@ -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(

View File

@@ -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;
}
/**