~openstack-charmers-next/charms/wily/swift-storage/trunk

« back to all changes in this revision

Viewing changes to lib/swift_storage_context.py

  • Committer: James Page
  • Date: 2016-02-12 11:51:19 UTC
  • mfrom: (102.2.4 trunk)
  • Revision ID: james.page@ubuntu.com-20160212115119-2c433lm25bfnjrj3
Use charmhelpers for worker configuration, resolving xenial compat problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    interfaces = []
81
81
 
82
82
    def __call__(self):
83
 
        import psutil
84
 
        multiplier = int(config('worker-multiplier')) or 1
85
83
        ctxt = {
86
84
            'local_ip': unit_private_ip(),
87
85
            'account_server_port': config('account-server-port'),
88
86
            'container_server_port': config('container-server-port'),
89
87
            'object_server_port': config('object-server-port'),
90
 
            'workers': str(psutil.NUM_CPUS * multiplier),
91
88
            'object_server_threads_per_disk': config(
92
89
                'object-server-threads-per-disk'),
93
90
            'account_max_connections': config('account-max-connections'),