From cb29109fc68adc8633d2680a8a8500317ed766ca Mon Sep 17 00:00:00 2001 From: Christophe Courtaut Date: Mon, 23 Sep 2013 16:25:25 +0200 Subject: [PATCH] Adds data sync capabilities to test server --- radosgw_agent/cli.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/radosgw_agent/cli.py b/radosgw_agent/cli.py index 9732f4c..00e51e3 100644 --- a/radosgw_agent/cli.py +++ b/radosgw_agent/cli.py @@ -194,6 +194,23 @@ class TestHandler(BaseHTTPRequestHandler): log.exception('error doing incremental metadata sync') status = 500 resp = str(e) + elif self.path.startswith('/data/full'): + try: + sync.DataSyncerFull('data', src, dest, args.daemon_id).sync(TestHandler.num_workers, + TestHandler.lock_timeout) + except Exception as e: + log.exception('error doing full data sync') + status = 500 + resp = str(e) + elif self.path.startswith('/data/incremental'): + try: + sync.DataSyncerInc('data', src, dest, args.daemon_id).sync(TestHandler.num_workers, + TestHandler.lock_timeout, + TestHandler.max_entries) + except Exception as e: + log.exception('error doing incremental data sync') + status = 500 + resp = str(e) else: log.warn('invalid request, ignoring') status = 400 -- 2.47.3