changed RequestSync to use injected apc and injected it in ThreadedRequestedSync.

This commit is contained in:
Rudi Grinberg 2012-11-15 12:12:19 -05:00
parent 15f4212360
commit fa66f33ffa
1 changed files with 4 additions and 6 deletions

View File

@ -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