j 1 year ago
parent
commit
216b880151
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      oml/oxtornado.py

+ 6
- 6
oml/oxtornado.py View File

@@ -38,13 +38,13 @@ def json_dumps(obj):
38 38
     return json.dumps(obj, indent=indent, default=_to_json, ensure_ascii=False).encode()
39 39
 
40 40
 def run_async(func):
41
-  @wraps(func)
42
-  def async_func(*args, **kwargs):
43
-    func_hl = Thread(target = func, args = args, kwargs = kwargs)
44
-    func_hl.start()
45
-    return func_hl
41
+    @wraps(func)
42
+    def async_func(*args, **kwargs):
43
+        func_hl = Thread(target=func, args=args, kwargs=kwargs)
44
+        func_hl.start()
45
+        return func_hl
46 46
 
47
-  return async_func
47
+    return async_func
48 48
 
49 49
 def trim(docstring):
50 50
     if not docstring: