def run(self):
   while True:
     #try to get a job from queue
     site = self.queue.get()
     if (site != None):
       newhash = checkerFunction(site['name'])
       if (site['hash'] != newhash):
         data = {"hash": newhash, "companyName": site['name']}
         #db object is shared by other threads.
         #put a lock on this object until its done executing
         with self.threadLock:
           self.db.updateSiteHash(data)
       #notify queue that job is finished
       self.queue.task_done()
from checker import checkerFunction
import os
import sys
print checkerFunction(sys.argv[1])