bug fix: lock, parallel processing bigquery
This commit is contained in:
parent
afcc5ed690
commit
84e212d5a3
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ def read(fname):
|
|||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
args = {
|
||||
"name":"data-transport",
|
||||
"version":"1.3.8.1",
|
||||
"version":"1.3.8.2",
|
||||
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
||||
"license":"MIT",
|
||||
"packages":["transport"]}
|
||||
|
|
|
@ -238,11 +238,11 @@ class BQWriter(BigQuery,Writer):
|
|||
def write(self,_info,**_args) :
|
||||
try:
|
||||
if self.parallel :
|
||||
self.lock.acquire()
|
||||
BQWriter.lock.acquire()
|
||||
self._write(_info,**_args)
|
||||
finally:
|
||||
if self.parallel:
|
||||
self.lock.release()
|
||||
BQWriter.lock.release()
|
||||
def _write(self,_info,**_args) :
|
||||
_df = None
|
||||
if type(_info) in [list,pd.DataFrame] :
|
||||
|
|
Loading…
Reference in New Issue