2017 © Pedro Peláez
 

library php-kue-client

PHP client for Kue priority job queue API

image

kop/php-kue-client

PHP client for Kue priority job queue API

  • Sunday, March 6, 2016
  • by kop
  • Repository
  • 1 Watchers
  • 3 Stars
  • 3,775 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 30 % Grown

The README.md

PHP client for Kue JSON API

Kue is a priority job queue backed by redis, built for node.js., (*1)

This package is a PHP client for Kue JSON API. It's tested with Kue version 0.10.3 and will be kept in sync with Kue changes on best effort basis., (*2)

Latest Stable Version Code Climate Scrutinizer Code Quality Gemnasium License, (*3)

Requirements

  • PHP 5.5

Installation

The preferred way to install this extension is through Composer., (*4)

Either run, (*5)

composer require kop/php-kue-client "dev-master"

or add, (*6)

"kop/php-kue-client": "dev-master"

to the require section of your composer.json file., (*7)

Usage

In order to connect to the Kue JSON API, all you need to do is to create an instance of \kop\kue\Client:, (*8)

$client = new \kop\kue\Client('https://kue-dashboard.domain.com');

// Get Kue stats
$stats = $client->stats();

// Create a new Job
$response = $client->jobs()->create(
    'email',
    [
        'title' => 'welcome email for tj',
        'to' => 'tj@learnboost.com',
        'template' => 'welcome-email',
    ],
    [
        'priority' => 'high',
    ],
);
$jobID = $response['id'];

// Get Job by it's ID
$job = $client->jobs()->get($jobID);

// Delete Job by it's ID
$client->jobs()->delete($jobID);

Supported API endpoints

This API client supports all endpoints exposed by Kue JSON API. The followings are methods that are used to map to this API endpoints:, (*9)

General

This methods, (*10)

  • stats() - Responds with state counts, and worker activity time in milliseconds;
  • jobs() - Returns commands that are related to Kue jobs.

Jobs

This methods can be accessed via jobs() method of the \kop\kue\Client., (*11)

  • search($query) - Search jobs;
  • create($type, $data, $options = []) - Creates a new job;
  • get($id) - Returns a job by it's ID;
  • logs($id) - Returns job logs by job ID;
  • delete($id) - Deletes a job by it's ID.

Configuration

This API client implements some additional features that are related to logging and errors handling. Please see the class source code for more details - it's well documented and should not cause any questions., (*12)

Report

License

This project is released under the MIT License. See the bundled LICENSE.md for details., (*13)

Resources

The Versions

06/03 2016

dev-master

9999999-dev https://kop.github.io/php-kue-client/

PHP client for Kue priority job queue API

  Sources   Download

MIT

The Requires

 

by Ivan Koptiev

api queue client job kue

06/03 2016

1.0.0

1.0.0.0 https://kop.github.io/php-kue-client/

PHP client for Kue priority job queue API

  Sources   Download

MIT

The Requires

 

by Ivan Koptiev

api queue client job kue