nodejitsu/haibu — Issue #72: refactor event names,
Author: dominictarr
Created: 2011-10-18 08:38:02+00:00
State: open

now that haibu uses redis pubsub https://github.com/nodejitsu/haibu/commit/352dec181c9ff38afb70739b4d84e7bfe246df11
to be properly useful we need to refactor the eventnames.

generally, they should be

`app:[user]:[app]:[whatever]`

or, if it's just to do with haibu,

`haibu:[haibuID]:[whatever]`

then, it will be possible to do realtime logs with just

`PSUBSCRIBE app:[user]:*`

here is a list of lines that should be changed. (use: `grep "haibu.emit(" lib/ -rn`)

``` bash

lib/haibu/core/spawner.js:108: haibu.emit('plugin:argv', 'info', {
lib/haibu/core/spawner.js:143: haibu.emit('spawn:start', 'info', {
lib/haibu/core/spawner.js:163: haibu.emit('drone:stdout', 'info', data.toString(), meta);
lib/haibu/core/spawner.js:171: haibu.emit('drone:stderr', 'error', data, meta);
lib/haibu/repositories/local-file.js:69: haibu.emit('local:clone', 'info', {
lib/haibu/repositories/git.js:57: haibu.emit('git:clone', 'info', {
lib/haibu/repositories/git.js:92: haibu.emit('git:clone', 'error', {
lib/haibu/repositories/tar.js:36: haibu.emit('tar:get', 'info', {
lib/haibu/repositories/repository.js:56: haibu.emit('repo:validate', 'warn', message, check);
lib/haibu/repositories/repository.js:121: haibu.emit('repo:dir:notfound', 'warn', { app: self.app.name, dir: self.appDir });
lib/haibu/repositories/repository.js:125: haibu.emit('repo:dir:empty', 'warn', { app: self.app.name, dir: self.appDir });
lib/haibu/repositories/repository.js:133: haibu.emit('repo:dir:exists', 'info', { app: self.app.name, dir: sourceDir });
lib/haibu/repositories/repository.js:147: haibu.emit('repo:dir:user:create', 'info', { app: self.app.name, dir: this.userDir });
lib/haibu/repositories/repository.js:152: haibu.emit('repo:dir:app:create', 'info', { app: self.app.name, dir: self.appDir });
lib/haibu/repositories/repository.js:159: haibu.emit('repo:dir:app:create', 'error', { app: self.app.name, dir: self.appDir });
lib/haibu/repositories/repository.js:164: haibu.emit('repo:dir:app:success', 'info', { app: self.app.name, dir: self.appDir });
lib/haibu/repositories/repository.js:176: haibu.emit('repo:dir:user:create', 'error', { app: self.app.name, dir: self.userDir });
lib/haibu/repositories/repository.js:180: haibu.emit('repo:dir:user:success', 'info', { app: self.app.name, dir: self.userDir });
lib/haibu/repositories/zip.js:36: haibu.emit('tar:get', 'info', {
lib/haibu/repositories/index.js:44: haibu.emit('repository:create', 'info', {
lib/haibu/drone/drone.js:201: haibu.emit('drone:cleanAll:end');
lib/haibu/drone/service.js:86: haibu.emit('error:service', 'error', err);
lib/haibu/drone/service.js:102: haibu.emit('error:service', 'error', err);
lib/haibu/drone/service.js:117: haibu.emit('error:service', 'error', err);
lib/haibu/drone/service.js:133: haibu.emit('error:service', 'error', err);
lib/haibu/drone/service.js:149: haibu.emit('error:service', 'error', err);
lib/haibu/drone/service.js:165: haibu.emit('error:service', 'error', err);
lib/haibu/utils/index.js:159: haibu.emit('service:incoming', 'info', {
lib/haibu/utils/index.js:217: haibu.emit('service:response', 'info', data);
lib/haibu/utils/npm.js:36: haibu.emit('npm:output', 'info', { info: message });
lib/haibu/utils/npm.js:45: haibu.emit('npm:load', 'info', haibu.utils.clone(npmConfig));
lib/haibu/utils/npm.js:48: haibu.emit('npm:load', 'error', { error: err.message });
lib/haibu/utils/npm.js:52: haibu.emit('npm:load:success', 'silly');
lib/haibu/utils/npm.js:71: haibu.emit('npm:install:none', 'info', { app: app.name });
lib/haibu/utils/npm.js:76: haibu.emit('npm:install:load', 'info', { app: app.name, dependencies: dependencies });
lib/haibu/utils/npm.js:105: haibu.emit('npm:install:success', 'info', meta);
lib/haibu/utils/npm.js:128: haibu.emit('npm:install:start', 'info', meta);
lib/haibu/utils/npm.js:169: haibu.emit('npm:list', 'info', { app: app.name, dependencies: dependencies });
lib/haibu/balancer/balancer.js:62: haibu.emit('balancer:proxy', 'info', {
lib/haibu/balancer/balancer.js:117: haibu.emit('balancer:incoming', 'info', req.headers);
lib/haibu/balancer/balancer.js:146: haibu.emit('balancer:serve', 'info', {

```