|
@@ -12,6 +12,7 @@ from datetime import datetime as dt
|
|
|
import multiprocessing as mp
|
|
|
from backtrader.feeds import PandasData
|
|
|
import platform
|
|
|
+import psutil
|
|
|
# import multiprocessing
|
|
|
# import matplotlib
|
|
|
|
|
@@ -266,6 +267,8 @@ def backtrader(list_date, table_list, result, result_change, result_change_fall,
|
|
|
if __name__ == '__main__':
|
|
|
starttime = dt.now()
|
|
|
print(starttime)
|
|
|
+ pus = psutil.Process()
|
|
|
+ pus.cpu_affinity([0, 1, 2, 3, 4, 5, 6, 7])
|
|
|
# print(type(platform.node()))
|
|
|
# engine = create_engine('mysql+pymysql://root:r6kEwqWU9!v3@localhost:3307/hlfx?charset=utf8', poolclass=NullPool)
|
|
|
|