Skip to content

Commit e25f5c8

Browse files
committed
[core] remove old option --clean
It's a legacy command which shouldn't be needed after DataDog#1435
1 parent 6757c35 commit e25f5c8

File tree

8 files changed

+4
-19
lines changed

8 files changed

+4
-19
lines changed

agent.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,7 @@ def main():
247247
deprecate_old_command_line_tools()
248248

249249
if command in COMMANDS_AGENT:
250-
pid_file = PidFile('dd-agent')
251-
252-
if options.clean:
253-
pid_file.clean()
254-
255-
agent = Agent(pid_file.get_path(), autorestart)
250+
agent = Agent(PidFile('dd-agent').get_path(), autorestart)
256251

257252
if command in START_COMMANDS:
258253
log.info('Agent version %s' % get_version())

config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def get_parsed_args():
7373
dest='autorestart')
7474
parser.add_option('-d', '--dd_url', action='store', default=None,
7575
dest='dd_url')
76-
parser.add_option('-c', '--clean', action='store_true', default=False,
77-
dest='clean')
7876
parser.add_option('-u', '--use-local-forwarder', action='store_true',
7977
default=False, dest='use_forwarder')
8078
parser.add_option('-n', '--disable-dd', action='store_true', default=False,
@@ -89,7 +87,6 @@ def get_parsed_args():
8987
# Ignore parse errors
9088
options, args = Values({'autorestart': False,
9189
'dd_url': None,
92-
'clean': False,
9390
'disable_dd':False,
9491
'use_forwarder': False}), []
9592
return options, args

dogstatsd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ def main(config_path=None):
439439

440440
if not args or args[0] in COMMANDS_START_DOGSTATSD:
441441
reporter, server, cnf = init(config_path, use_watchdog=True, use_forwarder=opts.use_forwarder, args=args)
442-
pid_file = PidFile('dogstatsd')
443-
daemon = Dogstatsd(pid_file.get_path(), server, reporter,
442+
daemon = Dogstatsd(PidFile('dogstatsd').get_path(), server, reporter,
444443
cnf.get('autorestart', False))
445444

446445
# If no args were passed in, run the server in the foreground.

tests/checks/integration/test_tomcat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from aggregator import MetricsAggregator
1313
from dogstatsd import Server
1414
from jmxfetch import JMXFetch
15-
from utils.pidfile import PidFile
1615

1716
STATSD_PORT = 8126
1817

@@ -43,7 +42,6 @@ class TestTomcat(unittest.TestCase):
4342
def setUp(self):
4443
aggregator = MetricsAggregator("test_host")
4544
self.server = Server(aggregator, "localhost", STATSD_PORT)
46-
pid_file = PidFile('dogstatsd')
4745
self.reporter = DummyReporter(aggregator)
4846

4947
self.t1 = threading.Thread(target=self.server.start)
@@ -64,7 +62,7 @@ def test_tomcat_metrics(self):
6462
while self.reporter.metrics is None:
6563
time.sleep(1)
6664
count += 1
67-
if count > 25:ga
65+
if count > 25:
6866
raise Exception("No metrics were received in 25 seconds")
6967

7068
metrics = self.reporter.metrics

tests/checks/mock/test_java_jmx.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ class JMXTestCase(unittest.TestCase):
101101
def setUp(self):
102102
aggregator = MetricsAggregator("test_host")
103103
self.server = Server(aggregator, "localhost", STATSD_PORT)
104-
pid_file = PidFile('dogstatsd')
105104
self.reporter = DummyReporter(aggregator)
106105

107106
self.t1 = threading.Thread(target=self.server.start)

tests/checks/mock/test_solr.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from dogstatsd import Server
1313
from jmxfetch import JMXFetch
1414
from tests.checks.common import Fixtures
15-
from utils.pidfile import PidFile
1615

1716
STATSD_PORT = 8127
1817

@@ -43,7 +42,6 @@ class JMXTestCase(unittest.TestCase):
4342
def setUp(self):
4443
aggregator = MetricsAggregator("test_host")
4544
self.server = Server(aggregator, "localhost", STATSD_PORT)
46-
pid_file = PidFile('dogstatsd')
4745
self.reporter = DummyReporter(aggregator)
4846

4947
self.t1 = threading.Thread(target=self.server.start)

tests/checks/mock/test_system_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import mock
22
import psutil
33

4-
from tests.common import AgentCheckTest
4+
from tests.checks.common import AgentCheckTest
55
from utils.platform import Platform
66

77
if Platform.is_mac():

win32/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def __init__(self, args):
5151
opts, args = Values({
5252
'autorestart': False,
5353
'dd_url': None,
54-
'clean': False,
5554
'use_forwarder': True,
5655
'disabled_dd': False
5756
}), []

0 commit comments

Comments
 (0)