Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.74 KB

01-GettingStarted.md

File metadata and controls

60 lines (43 loc) · 1.74 KB

Disqontrol

Requirements

  • PHP 5.5+
  • Disque
  • Function proc_open() allowed
  • Suggested: PHP extension PCNTL for a graceful shutting down of consumers

Installation

Install Disqontrol with the PHP package manager, Composer:

composer require disqontrol/disqontrol

Getting started

Copy the file docs/examples/disqontrol.yml.dist to disqontrol.yml, open disqontrol.yml and configure Disqontrol. If you just want to play around, the only section you need to change is disque, which contains the information about the connection to Disque.

For more details see Configuration.

Start Disqontrol and you're on:

/path/to/disqontrol supervisor

Using Disqontrol in your PHP application

In your application, all Disqontrol functions are accessible from an instance of Disqontrol\Disqontrol that you need to create. It can be as simple as

$pathToConfig = '/path/to/disqontrol.yml';
$disqontrol = new Disqontrol\Disqontrol($pathToConfig);

See docs/examples/app_bootstrap.php

If you use PHP workers, the setup is a bit more involved. See the documentation section "Using PHP Workers".