Commit Graph

12 Commits

Author SHA1 Message Date
David Glasser
3fc4a30bfe Better error message for -p bogus:1234 2014-04-18 14:39:31 -07:00
David Glasser
9b8bd31a7b Allow specifying interface with -p and --app-port
The syntax is "--port host:port".

Not implemented for test-packages. No control is available over mongo
ports (port or host).

Fixes #469 and #1105.
2014-04-18 14:15:14 -07:00
David Glasser
3e76ad7946 Don't use require('./run-log.js').runLog
If you happen to introduce a circular require into the stack, this
object will be undefined.

Instead, hang on to `require('./run-log.js')`, which is the exports
module which does get filled in later.
2014-03-31 19:52:02 -07:00
David Glasser
2586a50cd0 Refactor RunLog to be a singleton
The rationale: RunLog is an object that is hardcoded around managing two
other singletons: stdout and stderr. Having multiple RunLogs wouldn't
work well without improving RunLog to have the ability to control other
streams.

We'd like to be able to use RunLog from other places in the tool, most
notably from code called from bundler (while running an app) such as the
npm updater. But threading a RunLog object through that code is
difficult (especially as bundling takes a detour through
release.current.library).
2014-02-13 19:11:30 -08:00
David Glasser
10badc34e9 Avoid referring to a variable before declaration 2014-02-11 00:29:09 -08:00
David Glasser
aee1fb9dec avoid a theoretical race from last commit
Not sure if this is possible in practice (the listening callback gets
invoked via nextTick, which is usually before the event loop).
2014-02-11 00:26:51 -08:00
David Glasser
58a27d123c Fix and test some runner error handling issues
- Exit with failure if proxy starts to listen. Previously, we got stuck
  inside ProxyRunner.start(), and since we weren't waiting on any IO
  we'd exit 0!  (The existence of a yielded fiber is not sufficient to
  block Node exit.)

- Don't print various bits of startup text if we are stopped midway.

- Stop main Runner immediately if proxy or mongo runners invoke
  onFailure, rather than waiting for wait to be called and return.

- Ensure that a few Futures don't get return called on them multiple
  times.

- Ensure we don't try to call close() on the proxy's TCP server if it
  failed to listen in the first place.
2014-02-11 00:17:22 -08:00
David Glasser
b02857e4f2 re-randomize app port on each restart 2014-02-07 18:10:01 -08:00
David Glasser
a49e7def5e Merge branch 'sso' into tool-refactoring
Conflicts:
	tools/meteor.js
	tools/run.js
2014-01-30 10:49:29 -08:00
Geoff Schmidt
a5658ade21 bundler no longer takes a release
(it gets it from the app and from release.current)
2014-01-07 14:46:39 -08:00
Geoff Schmidt
9813345e15 move runMongoShell to appropriate file. fix some bugs. 2014-01-06 23:30:19 -08:00
Geoff Schmidt
088d70da36 runner refactor - WIP (break runner.js up into several files) 2014-01-03 20:36:13 -08:00