mns-scheduler 1.0.6.6__py3-none-any.whl → 1.0.6.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mns-scheduler might be problematic. Click here for more details.

@@ -164,8 +164,8 @@ def sync_all_interactive_questions(symbol_list):
164
164
  stock_irm_cninfo_df['valid'] = True
165
165
  stock_irm_cninfo_df = stock_irm_cninfo_df.dropna(subset=['answer_content'])
166
166
  stock_irm_cninfo_df = stock_irm_cninfo_df[stock_irm_cninfo_df['answer_content'] != '']
167
-
168
- mongodb_util.save_mongo(stock_irm_cninfo_df, db_name_constant.STOCK_INTERACTIVE_QUESTION)
167
+ # 保存新增数据
168
+ save_new_data(stock_irm_cninfo_df)
169
169
  logger.info("完成同步互动回答到:{}", stock_one.symbol)
170
170
  except Exception as e:
171
171
  time.sleep(5)
@@ -174,6 +174,24 @@ def sync_all_interactive_questions(symbol_list):
174
174
  sync_all_interactive_questions(fail_symbol_list)
175
175
 
176
176
 
177
+ def save_new_data(stock_irm_cninfo_df):
178
+ if data_frame_util.is_empty(stock_irm_cninfo_df):
179
+ return None
180
+ else:
181
+ irm_id_list = list(stock_irm_cninfo_df['_id'])
182
+ query = {"_id": {"$in": irm_id_list}}
183
+ query_field = {"_id": 1}
184
+
185
+ exist_df = mongodb_util.find_query_data_choose_field(db_name_constant.STOCK_INTERACTIVE_QUESTION, query,
186
+ query_field)
187
+ if data_frame_util.is_empty(exist_df):
188
+ new_df = stock_irm_cninfo_df
189
+ else:
190
+ new_df = stock_irm_cninfo_df.loc[~(stock_irm_cninfo_df['_id'].isin(list(exist_df['_id'])))]
191
+ if data_frame_util.is_not_empty(new_df):
192
+ mongodb_util.insert_mongo(new_df, db_name_constant.STOCK_INTERACTIVE_QUESTION)
193
+
194
+
177
195
  if __name__ == '__main__':
178
196
  fail_symbol_list_01 = ['000638', '002886', '688778', '688766', '688733', '688778', '688793', '688787']
179
197
  # get_stock_irm_cninfo_sh_api('603633')
@@ -186,8 +186,13 @@ def sync_realtime_quotes():
186
186
  auto_sell_service_api.auto_sell_stock(real_time_quotes_now.copy())
187
187
  except Exception as e:
188
188
  logger.error("自动卖出执行异常:{}", e)
189
+ if date_util.is_call_auction(str_now_date):
190
+ if number % 4 == 0:
191
+ save_real_time_quotes_his(real_time_quotes_now.copy(), now_date, realtime_quotes_db_name,
192
+ number_his)
193
+ number_his = number_his + 1
189
194
 
190
- if date_util.is_call_auction(str_now_date) or date_util.is_afternoon_time(now_date):
195
+ if date_util.is_afternoon_time(now_date):
191
196
  if number % 3 == 0:
192
197
  save_real_time_quotes_his(real_time_quotes_now.copy(), now_date, realtime_quotes_db_name,
193
198
  number_his)
@@ -199,7 +204,7 @@ def sync_realtime_quotes():
199
204
  number_his = number_his + 1
200
205
 
201
206
  else:
202
-
207
+ # 10:30 到11:30
203
208
  if number % 2 == 0:
204
209
  save_real_time_quotes_his(real_time_quotes_now.copy(), now_date, realtime_quotes_db_name,
205
210
  number_his)
@@ -381,7 +381,7 @@ blockingScheduler.add_job(update_one_concept_all_symbol_detail, 'cron', hour='08
381
381
  blockingScheduler.add_job(update_one_symbol_all_concepts, 'cron', hour='09,18,12', minute='15')
382
382
 
383
383
  # 开盘前同步同花顺新概念指数
384
- blockingScheduler.add_job(sync_new_concept_data_web, 'cron', hour='09', minute='05,10,15,20,25')
384
+ blockingScheduler.add_job(sync_new_concept_data_web, 'cron', hour='09', minute='05,10,15,20,25,29')
385
385
 
386
386
  # 同步同花顺新增概念指数(定时轮训,暂时10分钟)
387
387
  blockingScheduler.add_job(sync_new_concept_data_web, 'interval', minutes=10, max_instances=4)
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns-scheduler
3
- Version: 1.0.6.6
3
+ Version: 1.0.6.9
4
4
 
@@ -44,7 +44,7 @@ mns_scheduler/finance/test/fix_blask_list.py,sha256=sXmNcnfnjKHBylc27ysCCb9G4HYl
44
44
  mns_scheduler/hk/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
45
45
  mns_scheduler/hk/hk_company_info_sync_service_api.py,sha256=JEfIl_up36b1UpDxfPhosP6_i2Lo17Ma_GHLytoMjWI,3661
46
46
  mns_scheduler/irm/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
47
- mns_scheduler/irm/stock_irm_cninfo_service.py,sha256=7E6UWwL5hfRxH7-3oRY-C4nmB0UACRxC0Afo1dXLjgc,8923
47
+ mns_scheduler/irm/stock_irm_cninfo_service.py,sha256=BKQAQO8B7iSMydT8q1RxPwOrsCYxQYW8o041bUOzFhU,9712
48
48
  mns_scheduler/irm/api/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
49
49
  mns_scheduler/irm/api/sh_stock_sns_sse_info_api.py,sha256=iXy_FukyyQ_ZcU1WcT_DSpZ8-aEtDrTEcyiiIlFzXho,4931
50
50
  mns_scheduler/irm/api/sz_stock_sns_sse_info_api.py,sha256=6iZpdQ1pARchL3kV-oEVPDc9Ja0ciQBjBntVmxseeNE,6199
@@ -68,7 +68,7 @@ mns_scheduler/lhb/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg
68
68
  mns_scheduler/lhb/stock_lhb_sync_service.py,sha256=NIW0jX23N1dCEdsrKwt7MyzXSfhU7vXNpIO04dUSZwc,641
69
69
  mns_scheduler/real_time/__init__.py,sha256=QWBdZwBCvQw8aS4hnL9_pg3U3ZiNLUXzlImyy9WhUcI,163
70
70
  mns_scheduler/real_time/realtime_quotes_now_create_db_index.py,sha256=qQCjcsG3WYgn3zemS45Ms0AHtbkCwlSVPPCntxVvK8Q,1066
71
- mns_scheduler/real_time/realtime_quotes_now_sync.py,sha256=XIz454cysRO-xfdgsEw3glR0LgTxFdZoCNONd4O7EgM,9165
71
+ mns_scheduler/real_time/realtime_quotes_now_sync.py,sha256=x74SPEOon3rnintQ3k0VJpY3jOTh-DLKLAdENUBp-Xo,9491
72
72
  mns_scheduler/risk/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
73
73
  mns_scheduler/risk/register_and_investigate_stock_sync_api.py,sha256=pjVGZbSWQn6obobaJxsXQK7jeRrNQJ6kcwStQEj9R18,5086
74
74
  mns_scheduler/risk/stock_equity_mortgage_sync_api.py,sha256=MNj4kZ3VxxDwzFQjx-NuAGmOKcGnTaQIzGswdP_3pWc,871
@@ -85,9 +85,9 @@ mns_scheduler/zt/today_high_chg_pool_sync_api.py,sha256=KfEp2Mu8dZKB8DBai4m0UpZw
85
85
  mns_scheduler/zt/zt_five_boards_sync_api.py,sha256=HfjPHKD99fU9c37kSenEX2_qNvFAjQGgy8ERuacSxwk,10916
86
86
  mns_scheduler/zt/zt_pool_sync_api.py,sha256=RrVAbU1u-HTqXF9BSwNlzIxMHrUgjNaLpDKFgXC1XuY,7604
87
87
  mns_scheduler/zz_task/__init__.py,sha256=QWBdZwBCvQw8aS4hnL9_pg3U3ZiNLUXzlImyy9WhUcI,163
88
- mns_scheduler/zz_task/data_sync_task.py,sha256=Bltug8e4TChP5TdHhIV73tNVeh-j3EOGoUooZgCOZ54,16847
88
+ mns_scheduler/zz_task/data_sync_task.py,sha256=d-WI1oyUesTWnf227g9Nzy5K3iM0NvGLuq8zYNomzS8,16850
89
89
  mns_scheduler/zz_task/sync_realtime_quotes_task.py,sha256=DN3bq2XCDZC-PHlbD2NTog48bR44EruIEc2QVGKg7Tk,932
90
- mns_scheduler-1.0.6.6.dist-info/METADATA,sha256=Xy5WH57Ipin-TKW2SxrXvyxQ1RUR-WWKvpH2JgJTjt0,64
91
- mns_scheduler-1.0.6.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
92
- mns_scheduler-1.0.6.6.dist-info/top_level.txt,sha256=PXQDFBGR1pWmsUbH5yiLAh71P5HZODTRED0zJ8CCgOc,14
93
- mns_scheduler-1.0.6.6.dist-info/RECORD,,
90
+ mns_scheduler-1.0.6.9.dist-info/METADATA,sha256=pUvsVAigZFal_ouIbp1Msbf7PPImwH9oYIfnEF_wojE,64
91
+ mns_scheduler-1.0.6.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
92
+ mns_scheduler-1.0.6.9.dist-info/top_level.txt,sha256=PXQDFBGR1pWmsUbH5yiLAh71P5HZODTRED0zJ8CCgOc,14
93
+ mns_scheduler-1.0.6.9.dist-info/RECORD,,