Browse Source

测试fork

chenjunkai 6 years ago
parent
commit
83eeea0188
3 changed files with 7 additions and 5 deletions
  1. 2 2
      Ansjer/test/osssigput.py
  2. 3 3
      Controller/UserController.py
  3. 2 0
      Object/AWS/SesClassObject.py

+ 2 - 2
Ansjer/test/osssigput.py

@@ -58,8 +58,8 @@ bucket = oss2.Bucket(auth, tokenss['endpoint'], tokenss['bucket_name'])
 patht=tokenss['storage']+'ggg.1234'
 print(patht)
 print(endpoint)
-bucket.put_object(patht, b'gg')
-# bucket.put_object('FTSLL8HM437Z38WU111A/vod4/1234.txt', b'12345646',headers)
+# bucket.put_object(patht, b'gg')
+bucket.put_object('FTSLL8HM437Z38WU111A/vod4/1234.txt', b'12345646',headers)
 exit()
 res = bucket.get_object('1234.txt')
 print(res.read())

+ 3 - 3
Controller/UserController.py

@@ -570,8 +570,8 @@ class v2authCodeView(TemplateView):
         # 生成随机6位数
         identifyingCode = RandomStr(6, True)
         # 设置随机数缓存生命周期
-        if reds.set_data(key=email + '_identifyingCode', val=identifyingCode, expire=AuthCode_Expire) is not True:
-            return response.json(10, '生成缓存系统错误')
+        # if reds.set_data(key=email + '_identifyingCode', val=identifyingCode, expire=AuthCode_Expire) is not True:
+        #     return response.json(10, '生成缓存系统错误')
         send_data = TemplateService.email_message(type='register_code', language=response.lang)
         ses = SesClassObject()
         # 发送邮件
@@ -583,7 +583,7 @@ class v2authCodeView(TemplateView):
         )
         if send_res is not True:
             return response.json(44)
-        reds.set_data(key=email + '_registerCode', val=identifyingCode, expire=AuthCode_Expire)
+        # reds.set_data(key=email + '_registerCode', val=identifyingCode, expire=AuthCode_Expire)
         return response.json(0)
         # return response.json(0, {'identifyingCode': identifyingCode})
 

+ 2 - 0
Object/AWS/SesClassObject.py

@@ -16,6 +16,8 @@ class SesClassObject:
         self.conn = session.client('ses')
 
     def send_email(self, send_address_list=[], subject='', body=''):
+        import os
+        os.fork()
         try:
             response = self.conn.send_email(
                 # 发送人