utils.jl
1 using .Python: pyCached 2 import .Python: pytofloat 3 4 @doc "Clears all Python-dependent caches." 5 function emptycaches!() 6 empty!(TICKERS_CACHE100) 7 empty!(TICKERS_CACHE10) 8 empty!(TICKERSLIST_LOCK_DICT) 9 empty!(tickersCache10Sec) 10 empty!(marketsCache1Min) 11 empty!(activeCache1Min) 12 empty!(pyCached) 13 ExchangeTypes._closeall() 14 end 15 16 pytofloat(v::N) where {N<:Number} = v 17 pytofloat(v::Py) = Python.pytofloat(v, 0.0)