kurzor/queue

Implementation of PHP task queue using db to store tasks and statistics

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/kurzor/queue

dev-master 2018-01-29 10:56 UTC

This package is auto-updated.

Last update: 2025-09-25 06:00:37 UTC


README

Simple queue in PHP - currently under development.

Build Status Coverage Status

You need to have table jobs present in your database. Please run the SQL below to create it.

DROP TABLE IF EXISTS `jobs`;
CREATE TABLE `jobs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `handler` text COLLATE utf8_czech_ci NOT NULL,
  `queue` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'default',
  `attempts` int(10) unsigned NOT NULL DEFAULT '0',
  `run_at` datetime DEFAULT NULL,
  `locked_at` datetime DEFAULT NULL,
  `locked_by` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
  `failed_at` datetime DEFAULT NULL,
  `error` text COLLATE utf8_czech_ci,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;

Running tests

php composer.phar install && php composer.phar install
vendor/bin/phpunit --bootstrap=tests/TestHelper.php