Skip to content

Commit

Permalink
remove asyncio.sleep, invalid in py3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed Apr 23, 2021
1 parent 96b1b25 commit 776df09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hub/databuild/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def set_chrom(self, batch_size, job_manager):
# divide & conquer... build batches
jobs = []
total = self.target_backend.count()
btotal = math.ceil(total/batch_size)
btotal = math.ceil(total/batch_size)
bnum = 1
cnt = 0
results = {
Expand All @@ -62,7 +62,7 @@ def set_chrom(self, batch_size, job_manager):
(self.target_backend.target_collection.name, id_batch_size, batch_size))
for big_doc_ids in id_feeder(self.target_backend.target_collection, batch_size=id_batch_size, logger=self.logger):
for doc_ids in iter_n(big_doc_ids,batch_size):
yield from asyncio.sleep(0.1)
# yield from asyncio.sleep(0.1) # comment this out, this raised an error in py3.8
cnt += len(doc_ids)
pinfo = self.get_pinfo()
pinfo["step"] = "post-merge (chrom)"
Expand Down

0 comments on commit 776df09

Please sign in to comment.