Skip to content

Commit

Permalink
Merge pull request #49 from iain-buclaw-sociomantic/workers-option
Browse files Browse the repository at this point in the history
Add --workers option, reduce default to 4
  • Loading branch information
deniszh committed Apr 5, 2017
2 parents 9e7c5d0 + d25e281 commit 21d50c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/ceres-maintenance
Expand Up @@ -138,6 +138,7 @@ if __name__ == '__main__':
parser.add_option('--verbose', action='store_true', help="Increase truthiness")
parser.add_option('--log', help="Write to the given log file instead of stdout")
parser.add_option('--lock', help="lock file for maintenance proc")
parser.add_option('--workers', help="Number of workers to run (default: 4)", type=int, default=4)
parser.add_option('--root', default='/opt/graphite/storage/ceres/',
help="Specify were to perform maintenance "
"(default: /opt/graphite/storage/ceres/)")
Expand Down Expand Up @@ -239,7 +240,7 @@ if __name__ == '__main__':
# Begin walking the tree
dispatch('maintenance_start', tree)

proc_pool = Pool(processes=20)
proc_pool = Pool(processes=int(options.workers))

for current_dir, subdirs, files in os.walk(options.root):
for subdir in subdirs:
Expand Down

0 comments on commit 21d50c1

Please sign in to comment.