2
# Copyright (c) 2010-2011 OpenStack, LLC.
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
17
from swift.stats.db_stats_collector import ContainerStatsCollector
18
from swift.common.utils import parse_options
19
from swift.common.daemon import run_daemon
21
if __name__ == '__main__':
22
conf_file, options = parse_options()
23
# currently ContainerStatsCollector only supports run_once
24
options['once'] = True
25
run_daemon(ContainerStatsCollector, conf_file,
26
section_name='log-processor-container-stats',
27
log_name="container-stats", **options)