Skip to content

Commit

Permalink
fix: pickfile path of upload_worker in CLI mode
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed May 17, 2023
1 parent 2acf8ed commit 0157098
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion biothings/utils/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def upload_worker(name, storage_class, loaddata_func, col_name, batch_size, batc
)
import pickle

pickfile = os.path.join(os.path.dirname(logfile), "%s.pick" % logger_name)
# when logfile is None, we're in CLI mode, so we just use the current directory
pickfile = os.path.join(os.path.dirname(logfile) if logfile else ".", "%s.pick" % logger_name)
try:
pickle.dump(
{
Expand Down

0 comments on commit 0157098

Please sign in to comment.