Skip to content

Commit

Permalink
ENH: use separate tmp dir for kernel files per user
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgav committed Feb 17, 2024
1 parent 1fee3f7 commit 1900a65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bluesky_queueserver/manager/qserver_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asyncio
import copy
import enum
import getpass
import json
import logging
import os
Expand Down Expand Up @@ -1556,7 +1557,8 @@ def formatter(prog):
if exit_code == QServerExitCodes.SUCCESS:
logger.info("IPython Kernel Connect Info: \n%s", pprint.pformat(connect_info))

file_dir = os.path.join(tempfile.gettempdir(), "qserver", "kernel_files")
username = getpass.getuser()
file_dir = os.path.join(tempfile.gettempdir(), f"qserver_{username}", "kernel_files")
file_name = "kernel-" + str(uuid.uuid4()).split("-")[0] + ".json"
file_path = os.path.join(file_dir, file_name)

Expand Down

0 comments on commit 1900a65

Please sign in to comment.