a simple ticket system contians a centeral ticket dispatcher and distributed workers. This system is written in NodeJS, runing on MongoDB
A simple pull-based job/ticket system contians a centeral ticket dispatcher and distributed workers. This system is written in NodeJS, runing on MongoDB
This system consists of following 3 parts:
Install the module with:
npm install ticketman
var TicketWorker = require("ticketman").TicketWorker;
var TicketManager = require("ticketman").TicketManager;
new TicketManager : (@name, @host, basicAuth) ->
TicketManager.issue()
// issue : (title, category, content, callback)->
constructor: (options={}) ->
# @param {Object} options, optionally includes:
# options.name
# options.id
# options.consumerSecret
# options.host
# options.category
# options.timeout : ticket processing timeout in ms
# options.interval : self checking interval
# options.basicAuth : basicAuth
#
req.body:
{
title : "title of ticket",
owner_id : "name of owner",
category : "category the ticket belongs to",
content : {
detailed : "content of ticket",
mixed : ["data"]
}
}
req.body:
{
worker : "assignment worker"
category : "category the ticket belongs to"
}
req.body:
{
name : "worker",
kind : "info",
content : "test comment"
}
req.body:
{
name : "worker"
}
req.body:
{
name : "worker"
}
Copyright (c) 2014 yi Licensed under the MIT license.