tharms commited on
Commit
8d74a31
·
1 Parent(s): ea9a6d3

UNDO: adjust async worker to API mode

Browse files
Files changed (1) hide show
  1. modules/async_worker.py +3 -12
modules/async_worker.py CHANGED
@@ -1,5 +1,8 @@
1
  import threading
2
  import re
 
 
 
3
 
4
  class AsyncTask:
5
  def __init__(self, args):
@@ -12,22 +15,10 @@ class AsyncTask:
12
 
13
  async_tasks = []
14
 
15
- def ini_args():
16
- from args_manager import args
17
- return args
18
-
19
- args = ini_args()
20
- if not args.api_mode:
21
- from modules.patch import PatchSettings, patch_settings, patch_all
22
- patch_all()
23
 
24
  def worker():
25
  global async_tasks
26
 
27
- if args.api_mode:
28
- return
29
-
30
- from modules.patch import PatchSettings, patch_settings, patch_all
31
  import os
32
  import traceback
33
  import math
 
1
  import threading
2
  import re
3
+ from modules.patch import PatchSettings, patch_settings, patch_all
4
+
5
+ patch_all()
6
 
7
  class AsyncTask:
8
  def __init__(self, args):
 
15
 
16
  async_tasks = []
17
 
 
 
 
 
 
 
 
 
18
 
19
  def worker():
20
  global async_tasks
21
 
 
 
 
 
22
  import os
23
  import traceback
24
  import math