File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11name : github-repo-stats
22
33on :
4- # schedule:
4+ schedule :
55 # Run this once per day, towards the end of the day for keeping the most
66 # recent data point most meaningful (hours are interpreted in UTC).
7- # - cron: "0 23 * * *"
7+ - cron : " 0 23 * * *"
88 workflow_dispatch : # Allow for running this manually.
99
1010jobs :
Original file line number Diff line number Diff line change 1616# Store a global reference to the middleware instance so tools can interact
1717# with it to set or clear the active unity instance.
1818_unity_instance_middleware = None
19+ _middleware_lock = RLock ()
1920
2021
2122def get_unity_instance_middleware () -> 'UnityInstanceMiddleware' :
2223 """Get the global Unity instance middleware."""
2324 global _unity_instance_middleware
2425 if _unity_instance_middleware is None :
25- # Auto-initialize if not set (lazy singleton) to handle import order or test cases
26- _unity_instance_middleware = UnityInstanceMiddleware ()
26+ with _middleware_lock :
27+ if _unity_instance_middleware is None :
28+ # Auto-initialize if not set (lazy singleton) to handle import order or test cases
29+ _unity_instance_middleware = UnityInstanceMiddleware ()
2730
2831 return _unity_instance_middleware
2932
You can’t perform that action at this time.
0 commit comments