Skip to content

Commit 444ff12

Browse files
committed
code review
1 parent 647531f commit 444ff12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/tracing/tracing_new_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, code: FakeCode, prior: FakeFrame | None) -> None:
4949

5050

5151
def patch_ap_scheduler() -> None:
52-
if find_spec("apscheduler") is None:
52+
if find_spec("apscheduler"):
5353

5454
import apscheduler.schedulers.background as bg
5555
import apscheduler.schedulers.blocking as bb
@@ -833,6 +833,7 @@ def runctx(self, cmd: str, global_vars: dict[str, Any], local_vars: dict[str, An
833833
if __name__ == "__main__":
834834
args_dict = json.loads(sys.argv[-1])
835835
sys.argv = sys.argv[1:-1]
836+
patch_ap_scheduler()
836837
if args_dict["module"]:
837838
import runpy
838839

@@ -852,7 +853,6 @@ def runctx(self, cmd: str, global_vars: dict[str, Any], local_vars: dict[str, An
852853
}
853854
args_dict["config"]["module_root"] = Path(args_dict["config"]["module_root"])
854855
args_dict["config"]["tests_root"] = Path(args_dict["config"]["tests_root"])
855-
patch_ap_scheduler()
856856
tracer = Tracer(
857857
config=args_dict["config"],
858858
output=Path(args_dict["output"]),

0 commit comments

Comments
 (0)