~neilschelly/graphite/dyn

« back to all changes in this revision

Viewing changes to carbon/lib/carbon/conf.py

  • Committer: Sidnei da Silva
  • Date: 2011-07-26 16:19:03 UTC
  • Revision ID: sidnei.da.silva@canonical.com-20110726161903-v418tyjf67qklc43
- Remove duplicate WriterService which was causing cache contention.
- Initialize settings["instance"] from options["instance"].
- Don't rely on globals 'instance' and 'program' in instrumentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
                os.makedirs(logdir)
201
201
            log.logToDir(logdir)
202
202
 
203
 
    def parseArgs(self, action):
 
203
    def parseArgs(self, *action):
204
204
        """If an action was provided, store it for further processing."""
205
 
        self["action"] = action
 
205
        if len(action) == 1:
 
206
            self["action"] = action[0]
206
207
 
207
208
    def handleAction(self):
208
209
        """Handle extra argument for backwards-compatibility.
409
410
    section = program[len("carbon-"):]
410
411
    settings.readFrom(options["config"], section)
411
412
 
 
413
    settings.setdefault("instance", options["instance"])
 
414
 
412
415
    # If a specific instance of the program is specified, augment the settings
413
416
    # with the instance-specific settings and provide sane defaults for
414
417
    # optional settings.