From fa66f33ffa74c89b3b0a3ca878320d4307a2ec1a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 15 Nov 2012 12:12:19 -0500 Subject: [PATCH] changed RequestSync to use injected apc and injected it in ThreadedRequestedSync. --- python_apps/media-monitor2/media/monitor/request.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/request.py b/python_apps/media-monitor2/media/monitor/request.py index a49c6bb25..e2c5fb5ef 100644 --- a/python_apps/media-monitor2/media/monitor/request.py +++ b/python_apps/media-monitor2/media/monitor/request.py @@ -1,14 +1,12 @@ # -*- coding: utf-8 -*- -import threading - from media.monitor.exceptions import BadSongFile from media.monitor.log import Loggable -import api_clients.api_client as ac +from media.saas.thread import apc, InstanceInheritingThread -class ThreadedRequestSync(threading.Thread, Loggable): +class ThreadedRequestSync(InstanceInheritingThread, Loggable): def __init__(self, rs): - threading.Thread.__init__(self) + super(ThreadedRequestSync, self).__init__() self.rs = rs self.daemon = True self.start() @@ -22,7 +20,7 @@ class RequestSync(Loggable): for some number of times """ @classmethod def create_with_api_client(cls, watcher, requests): - apiclient = ac.AirtimeApiClient.create_right_config() + apiclient = apc() self = cls(watcher, requests, apiclient) return self