Register the queue worker.

@return void
511233
protected function registerWorker()
    {
        $this->app->singleton('queue.worker', function () {
            return new Worker(
                $this->app['queue'], $this->app['events'], $this->app[ExceptionHandler::class]
            );
        });
    }
1130067
public function registerEvents()
    {
        $job = & $this->job;

        Event::listen(Event::JOB_PERFORM, function ($event, $_job) use (&$job) {
            $job = $_job;
        });
    }
552602
protected function registerFailedJobServices()
    {
        Zilf::$container->register(
            'queue.failer', function () {
                $config = config('queue.failed');

                return isset($config['table'])
                        ? $this->databaseFailedJobProvider($config)
                        : new NullFailedJobProvider;
            }
        );
    }
777694
public function register()
    {
        $this->app->singleton('actions', function (Application $app) {
            return (new Dispatcher($app))->setQueueResolver(
                function () use ($app) {
                    return $app->make(Queue::class);
                }
            );
        });
    }
1133280
public function register()
    {
        $this->app->singleton('database.migrator', function ($app) {
            return new Migrator($app['db'], $app['config']);
        });
        $this->app->alias('database.migrator', Migrator::class);

        $this->registerCommands();
    }
954835
public function register()
    {
        $this->app->singleton('Congraph\Core\Bus\CommandDispatcher', function ($app) {
            return new CommandDispatcher($app, function () use ($app) {
                return $app['Illuminate\Contracts\Queue\Queue'];
            });
        });

        $this->app->alias(
            'Congraph\Core\Bus\CommandDispatcher', 'Illuminate\Contracts\Bus\Dispatcher'
        );

        $this->app->alias(
            'Congraph\Core\Bus\CommandDispatcher', 'Illuminate\Contracts\Bus\QueueingDispatcher'
        );
    }
633176
public function register()
    {
        $this->bindConfig();

        $this->app->bind('Tokenly\XcallerClient\Client', function($app) {
            $queue_manager = $this->app->make('Illuminate\Queue\QueueManager');
            $client = new Client(Config::get('xcaller-client.queue_connection'), Config::get('xcaller-client.queue_name'), $queue_manager);
            return $client;
        });
    }
1137305
protected function registerTaskCallback()
    {
        $this->swooleServer->on('Task', function ($server, $taskId, $srcWorkerId, $data) {
            $this->events->dispatch(new Events\TaskTriggered($this, $taskId, $srcWorkerId, $data));

            $this->dispatchEvent('Task', $this, $taskId, $srcWorkerId, $data);
        });
    }
283491
protected function registerExecutor()
    {
        $this->app->singleton('backup.executor', function (Container $app) {
            $logger = $app['log'];

            return new Executor($logger);
        });

        $this->app->alias('backup.executor', Executor::class);
    }
849393
public function register()
    {
        $this->resolveDirectories();

        $this->tryRequireHelpers(self::ON_REGISTER);
        $this->tryRegisterProviders(self::ON_REGISTER);

        if (method_exists($this, $this->bootingMethod)) {
            $this->app->booting(function (Application $app) {
                $app->call([$this, $this->bootingMethod]);
            });
        }

        if (method_exists($this, $this->bootedMethod)) {
            $this->app->booted(function (Application $app) {
                $app->call([$this, $this->bootedMethod]);
            });
        }

        // Config
        $this->registerConfigFiles();

        // Middlewares
        if (!$this->app->runningInConsole()) {
            $router = $this->app->make('router');
            $kernel = $this->app->make('Illuminate\Contracts\Http\Kernel');

            foreach ($this->prependMiddleware as $middleware) {
                $kernel->prependMiddleware($middleware);
            }

            foreach ($this->middleware as $middleware) {
                $kernel->pushMiddleware($middleware);
            }

            foreach ($this->routeMiddleware as $key => $middleware) {
                $router->middleware($key, $middleware);
            }
        }

        // Container bindings and aliases
        foreach ($this->bindings as $binding => $class) {
            $this->app->bind($binding, $class);
        }

        foreach ($this->weaklings as $binding => $class) {
            $this->bindIf($binding, $class);
        }

        foreach (['share' => $this->share, 'shared' => $this->shared] as $type => $bindings) {
            foreach ($bindings as $binding => $class) {
                $this->share($binding, $class, [], $type === 'shared');
            }
        }

        foreach ($this->singletons as $binding => $class) {
            if ($this->strict && !class_exists($class) && !interface_exists($class)) {
                throw new \Exception(get_called_class().": Could not find alias class [{$class}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->singleton($binding, $class);
        }

        foreach ($this->aliases as $alias => $full) {
            if ($this->strict && !class_exists($full) && !interface_exists($full)) {
                throw new \Exception(get_called_class().": Could not find alias class [{$full}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->alias($alias, $full);
        }

        // Commands
        if ($this->app->runningInConsole()) {
            foreach ($this->findCommands as $path) {
                $dir = path_get_directory((new ReflectionClass(get_called_class()))->getFileName());
                $classes = $this->findCommandsIn(path_join($dir, $path), $this->findCommandsRecursive);

                $this->commands = array_merge($this->commands, $classes);
            }
            if (is_array($this->commands) && count($this->commands) > 0) {
                $commands = [];
                foreach ($this->commands as $k => $v) {
                    if (is_string($k)) {
                        $this->app[ $this->commandPrefix.$k ] = $this->app->share(function ($app) use ($k, $v) {
                            return $app->build($v);
                        });

                        $commands[] = $this->commandPrefix.$k;
                    } else {
                        $commands[] = $v;
                    }
                }
                $this->commands($commands);
            }
        }
        // Facades
        if (class_exists('Illuminate\Foundation\AliasLoader')) {
            \Illuminate\Foundation\AliasLoader::getInstance($this->facades)->register();
        }

        // Helpers
        $this->tryRequireHelpers(self::ON_REGISTERED);

        $this->tryRegisterProviders(self::ON_REGISTERED);

        return $this->app;
    }
1006163
public function register()
    {
        $this->app->singleton(Factory::class, function ($app) {
            $faker = Faker::create();

            $analogueManager = $app->make('analogue');

            return Factory::construct($faker, database_path('factories'), $analogueManager);
        });
    }
576583
public function register()
    {
        $this->app->singleton('Illuminate\Contracts\Auth\Guard', function () {
            $hasher = $this->app->make('Illuminate\Contracts\Hashing\Hasher');
            $session = $this->app->make('Symfony\Component\HttpFoundation\Session\SessionInterface');

            $provider = new EloquentUserProvider($hasher, 'FluxBB\Models\User');
            $guard = new Guard($provider, $session);

            $guard->setCookieJar($this->app->make('Illuminate\Contracts\Cookie\QueueingFactory'));
            $guard->setDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher'));
            $guard->setRequest($this->app->make('Symfony\Component\HttpFoundation\Request'));

            return $guard;
        });

        if (Core::isInstalled()) {
            $this->app->extend('view', function ($view) {
                $view->share('user', $this->app->make('Illuminate\Contracts\Auth\Guard')->user());

                return $view;
            });
        }
    }
754196
public function register()
    {
        $this->app->singleton('Illuminate\Bus\Dispatcher', function ($app) {
            return new Dispatcher($app, function ($connection = null) use ($app) {
                return $app['Illuminate\Contracts\Queue\Factory']->connection($connection);
            });
        });

        $this->app->alias(
            'Illuminate\Bus\Dispatcher', 'Illuminate\Contracts\Bus\Dispatcher'
        );

        $this->app->alias(
            'Illuminate\Bus\Dispatcher', 'Illuminate\Contracts\Bus\QueueingDispatcher'
        );
    }
512781
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/config/laravel-random.php', 'laravel-random');
        
        $this->app->singleton('random', function ($app) {
            $factory = new \RandomLib\Factory;
            
            $strength = $app['config']->get('laravel-random.strength');
            
            if ($strength === 'high') {
                return $factory->getHighStrengthGenerator();
            }
            
            if ($strength === 'medium') {
                return $factory->getMediumStrengthGenerator();
            }
            
            return $factory->getLowStrengthGenerator();
        });
    }
18850
private function startup()
	{
		$this->registerSigHandlers();
		$this->pruneDeadWorkers();
		Resque_Event::trigger('beforeFirstFork', $this);
		$this->registerWorker();
	}
1086179
protected function registerMigrationService(): void
    {
        $config = $this->app['config'];
        $config->set('database.migrations', $config->get('database.migrations') ?: 'migrations');
        $this->app->register(\Illuminate\Database\MigrationServiceProvider::class);

        $this->app->alias(
            'migration.repository',
            \Illuminate\Database\Migrations\MigrationRepositoryInterface::class
        );

        $this->app->singleton(
            'migrator',
            function ($app) {
                $repository = $app['migration.repository'];

                return new Migrator($repository, $app['db'], $app['files']);
            }
        );

        $this->app->alias(
            'migrator',
            \Illuminate\Database\Migrations\Migrator::class
        );
    }
436121
protected function registerQueueBindings()
    {
        $this->singleton('queue', function () {
            return $this->loadComponent('queue', 'Illuminate\Queue\QueueServiceProvider', 'queue');
        });

        $this->singleton('queue.listener', function () {
            return $this->loadComponent('queue', 'Illuminate\Queue\QueueServiceProvider', 'queue.listener');
        });

        $this->singleton('queue.connection', function () {
            return $this->loadComponent('queue', 'Illuminate\Queue\QueueServiceProvider', 'queue.connection');
        });
    }