npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ticketman

v0.2.7

Published

A simple pull-based job/ticket system contians a centeral ticket dispatcher and distributed workers. This system is written in NodeJS, runing on MongoDB

Downloads

36

Readme

ticket-system

Build Status Dependencies Status

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:

  • Ticketman website - a ExpressJS app display the current status of the centeral ticket system
  • TicketManager - a JS Class for create(TicketManager.issue) new ticket
  • TicketWorker - a JS Class pulls ticket from Ticketman website on a routine, it can also complete/giveup/add comment to a ticket. The TicketWorker instance works on one ticket at time.

Install as NodeJS module:

Install the module with:

npm install ticketman

Screenshots

Job (Tickets) List

Ticketman screenshot 01

Ticket detail

Ticketman screenshot 02

Client-worker add comments to ticket

Ticketman screenshot 03

Manage multiple client-workers

Ticketman screenshot 04

Use the Ticketman website

  1. Download and extract the latest release from https://github.com/yi/node-ticket-manager/releases
  2. run "npm install" to install dependencies
  3. run "npm start" to start the service
  4. Open http://localhost:3456 in your web browser

NodeJS Module Usage

var  TicketWorker = require("ticketman").TicketWorker;
var  TicketManager = require("ticketman").TicketManager;

TicketManager API

new TicketManager : (@name, @host, basicAuth) ->

TicketManager.issue()
// issue : (title, category, content, callback)->

TicketWorker API

Instance construction

  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
  #

Evnets:

  • on "new ticket", listener signature: eventListener(ticket)
  • on "complete", listener signature: eventListener(ticket)
  • on "giveup", listener signature: eventListener(ticket)

Instance Methods

  • complete : ()->
  • update : (message, kind='default')->
  • giveup: (reason)->

HTTP API Calls:

POST '/api/tickets/new', Admin create ticket

req.body:

{
  title : "title of ticket",
  owner_id : "name of owner",
  category : "category the ticket belongs to",
  content : {
    detailed : "content of ticket",
    mixed : ["data"]
  }
}

PUT '/api/tickets/assign', Worker ask for a ticket assignment

req.body:

{
  worker : "assignment worker"
  category : "category the ticket belongs to"
}

PUT '/api/tickets/:id/comment', Worker add comment to a ticket

req.body:

{
  name : "worker",
  kind : "info",
  content : "test comment"
}

PUT '/api/tickets/:id/complete', Worker complete a ticket

req.body:

{
  name : "worker"
}

PUT '/api/tickets/:id/giveup', Worker giveup a ticket

req.body:

{
  name : "worker"
}

License

Copyright (c) 2014 yi Licensed under the MIT license.