Browse Source

import utils

xuekailun 4 months ago
parent
commit
efdbe2745a
4 changed files with 13 additions and 1 deletions
  1. 1 1
      longvideoapi/longvideoapi_scaling_k_count.py
  2. 0 0
      test/__init__.py
  3. 8 0
      test/runcommand.py
  4. 4 0
      util/utils.py

+ 1 - 1
longvideoapi/longvideoapi_scaling_k_count.py

@@ -5,7 +5,7 @@ import logging
 import time
 import requests
 
-from util import utils
+from ..util import utils
 import longvideoapi_config
 from concurrent.futures import ThreadPoolExecutor
 

+ 0 - 0
test/__init__.py


+ 8 - 0
test/runcommand.py

@@ -0,0 +1,8 @@
+import unittest
+
+class MyTestCase(unittest.TestCase):
+    def test_something(self):
+        self.assertEqual(True, False)  # add assertion here
+
+if __name__ == '__main__':
+    unittest.main()

+ 4 - 0
util/utils.py

@@ -283,6 +283,8 @@ def send_request(ecs_client, request):
     :param request: 请求配置
     :return: response
     """
+    print(ecs_client, request)
+    print(2222222222)
     request.set_accept_format('json')
     try:
         response = ecs_client.do_action_with_exception(request)
@@ -304,6 +306,8 @@ def run_command(ecs_client, instance_ids, command):
     :param command: 命令 type-string
     :return:
     """
+    print(11111)
+    print(ecs_client, instance_ids, command)
     for i in range(len(instance_ids) // 50 + 1):
         instance_id_list = instance_ids[i * 50:(i + 1) * 50]
         if len(instance_id_list) == 0: