Skip to content

Commit

Permalink
Merge pull request #2 from j0nes2k/patch-2
Browse files Browse the repository at this point in the history
Workaround for "No .label provided" bug
  • Loading branch information
Antonis Christofides committed Jan 28, 2014
2 parents 1cb91fd + 8a9bac2 commit 1df11be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uwsgi_
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def config(apps):
'graph_category {1}\n').format(MODES[mode], 'uwsgi')
if mode in ['tx', 'rss']:
out += 'graph_args --base 1024\n'
if mode in ['requests', 'exceptions', 'tx']:
out += ('{0}.type DERIVE\n'
'{0}.min 0\n').format(mode)
for app in apps:
out += "{0}.label {0}\n".format(app["name"], mode)
if mode in ['requests', 'exceptions', 'tx']:
out += ('{0}.type DERIVE\n'
'{0}.min 0\n').format(app["name"])
return out


Expand Down Expand Up @@ -117,7 +117,7 @@ if mode == '':
mode = 'requests'

if len(sys.argv)>1 and sys.argv[1]=='config':
print config(apps)
sys.stdout.write(config(apps))
sys.exit(0)

if mode == 'rss':
Expand Down

0 comments on commit 1df11be

Please sign in to comment.