thread.run() runs it locally

thread.start() runs it in a thread
This commit is contained in:
codl 2017-08-11 20:56:45 +02:00
parent 5ee7041e20
commit dc7e70ae8d
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class BrotliCache(object):
lock_key = 'brotlicache:lock:{}'.format(digest)
if self.redis.set(lock_key, 1, nx=True, ex=10):
t = Thread(target=self.compress, args=(cache_key, lock_key, body))
t.run()
t.start()
return response