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

hubot-luigi

v1.2.0

Published

A hubot script that interact with luigi scheduler

Downloads

41

Readme

Hubot Luigi Script

Interact with luigi central scheduler, to get job status, worker status, etc.

Installation

Add the package hubot-luigi entry to the packages.json file (you may need to create this file).

"dependencies": {
  "hubot-luigi": "1.0.x"
}

Run the following command to make sure the module is installed.

#npm install hubot-luigi

To enable the script, add the hubot-luigi entry to the external-scripts.json file (you may need to create this file).

["hubots-luigi"]

Configuration

  • HUBOT_LUIGI_ENDPOINT - specify luigi scheduler api endpoint, like 'http://localhost:8082/api/'

Usage Examples

stats

user1> hubot luigi stats
hubot> 8 jobs running, 1315 jobs pending, 76 jobs failed, 5737 jobs disabled

show

user1> hubot luigi show pending
hubot> Wed Sep 02 2015 13:27:36 GMT-0700 (PDT) Task(param1=value) p=50
       Wed Sep 02 2015 13:27:36 GMT-0700 (PDT) WrapperTask(run=all_tasks) p=50
       Wed Sep 02 2015 13:27:36 GMT-0700 (PDT) HadoopHourlyJob(jar=process_logs.jar, time=2015-08-30T00) p=100
       Wed Sep 02 2015 13:27:36 GMT-0700 (PDT) ScpTask(file=filename.csv, target=server) p=10

Show can be run with any task status, including pending, running, disabled, failed. If more than 20 tasks are to be shown, it will truncate the list and state how many more there are.

search

user1> hubot luigi search Hadoop
hubot> DONE Sun Aug 30 2015 00:12:21 GMT-0700 (PDT) HadoopHourlyJob(jar=process_logs.jar, time=2015-08-30T01) p=100
       DONE Sun Aug 30 2015 00:12:21 GMT-0700 (PDT) HadoopHourlyJob(jar=process_logs.jar, time=2015-08-30T00) p=100
       DONE Sun Aug 30 2015 00:12:21 GMT-0700 (PDT) HadoopHourlyJob(jar=process_logs.jar, time=2015-08-30T02) p=100
       DONE Sun Aug 30 2015 01:12:18 GMT-0700 (PDT) HadoopHourlyJob(jar=analytics_reports.jar, time=2015-08-30T00) p=15

Search matches the query against task ids and is case sensitive. Results are truncated as in show.

resources

user1> hubot luigi resources
hubot> impala: 3/4
       hadoop_xl: 2/2
       mysql_access: 0/5

This will only show resources that are defined in luigi.cfg and not ones that are created in response to task scheduling.

refresh resources

user1> hubot luigi refreshresources
hubot> impala: 3/2
       hadoop_xl: 2/3
       mysql_access: 0/4

This causes the scheduler to dynamically reload the resource constraints from luigi.cfg. The current resource usage is then displayed, which can violate the new constraints until existing jobs have had a chance to finish.

workers

user1> hubot luigi workers
hubot> 781608491 AllTasksFrontFill(days=1, end_time=2015-09-02T13:30) [10]  1 running, 637 pending
       377433553 AllTasksFrontFill(days=1, end_time=2015-09-02T13:00) [10]  6 running, 486 pending
       042179238 AllTasksFrontFill(days=1, end_time=2015-09-01T16:00) [10]  0 running, 46 pending
       208362896 AllTasksFrontFill(days=5, end_time=2015-09-01T03:00) [10]  2 running, 496 pending

worker

user1> hubot luigi worker 208362896
hubot> 208362896 AllTasksFrontFill(days=5, end_time=2015-09-01T03:00) [10]  3 running, 496 pending, 478 unique pending

       running tasks: NumberedTask(n=7), NumberedTask(n=18), NumberedTask(n=3)