mns-common 1.2.9.2__py3-none-any.whl → 1.2.9.4__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-common might be problematic. Click here for more details.

@@ -21,8 +21,18 @@ class MongodbUtil:
21
21
 
22
22
  def get_db(self):
23
23
  port = self.port
24
-
25
- client = pymongo.MongoClient("mongodb://192.168.200.2:" + port + "/patience")
24
+ mac_address = ip_util.get_mac_address()
25
+ if port == "remote":
26
+ client = pymongo.MongoClient("mongodb://100.87.2.149:" + '27017' + "/patience")
27
+ elif port == "remote1":
28
+ client = pymongo.MongoClient("mongodb://100.87.2.149:" + '27019' + "/patience")
29
+ # 家里
30
+ elif mac_address is not None and mac_address == ip_util.WINDOWS_MAC_ADDRESS_CD:
31
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
32
+ elif '192.168.1' in ip_util.get_host_ip() and mac_address is not None and mac_address == ip_util.APPLE_AIR_MAC_ADDRESS:
33
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
34
+ else:
35
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
26
36
  return client.patience
27
37
 
28
38
  def group(self, query, coll_name):
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns_common
3
- Version: 1.2.9.2
3
+ Version: 1.2.9.4
4
4
 
@@ -114,7 +114,7 @@ mns_common/constant/db_name_constant.py,sha256=3o0HsZHomPXqw5UwRYWDhgvSBRj2lUoXZ
114
114
  mns_common/constant/price_enum.py,sha256=nhcPxk0AFdQAp8IsNr5EP9xURLqqJuSl6ljIzTp7Wyo,1093
115
115
  mns_common/constant/redis_msg_constant.py,sha256=fMtI_WbJ2IkMX4qGwvR5MkMO0NqU8XgUUZqQzHIRscU,501
116
116
  mns_common/constant/self_choose_constant.py,sha256=QJVSwUpnXvMYA62V3_8ptDqBdI2J8S5FqI5rYSJTwT0,496
117
- mns_common/db/MongodbUtil.py,sha256=KN7StZYcyng9ga9ywNxvwI4wq4UjOOo3CNY4Kmp5E3k,11024
117
+ mns_common/db/MongodbUtil.py,sha256=oO6t_kKiC13uS4M3OyyQkc_ktfOKhBgWLu49LVy4QQo,11745
118
118
  mns_common/db/MongodbUtilLocal.py,sha256=xLUTeeZ83BbqPtUEwy7QmPtkSfwPyNB_5ggkn-eMpBQ,7560
119
119
  mns_common/db/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
120
120
  mns_common/utils/__init__.py,sha256=xu36nA6MJTauswUWPfKIKH0E-lpOAHTw2TL5QI_6TeY,165
@@ -125,7 +125,7 @@ mns_common/utils/date_handle_util.py,sha256=-WJF_0DRkPkKlfQ5lVqJu8mH3EhpIZ-EBrz0
125
125
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
126
126
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
127
127
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
128
- mns_common-1.2.9.2.dist-info/METADATA,sha256=8MO0MDtrsAxtMEEFi0Vuwj9Rg6sjI6pL7S5ojKaLQWw,61
129
- mns_common-1.2.9.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
130
- mns_common-1.2.9.2.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
131
- mns_common-1.2.9.2.dist-info/RECORD,,
128
+ mns_common-1.2.9.4.dist-info/METADATA,sha256=Hhh6iDdRKPVh-FglVpXeifR1J9NHv25YfqKtJ2tt99Y,61
129
+ mns_common-1.2.9.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
130
+ mns_common-1.2.9.4.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
131
+ mns_common-1.2.9.4.dist-info/RECORD,,