File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,8 @@ def run_once(self) -> None:
148148 if locked :
149149 self .lock .release ()
150150 for work in works :
151- if self .flags .local_executor == int (DEFAULT_LOCAL_EXECUTOR ):
151+ if self .flags .threadless and \
152+ self .flags .local_executor :
152153 assert self ._local_work_queue
153154 self ._local_work_queue .put (work )
154155 else :
@@ -171,7 +172,7 @@ def run(self) -> None:
171172 type = socket .SOCK_STREAM ,
172173 )
173174 try :
174- if self .flags .local_executor == int ( DEFAULT_LOCAL_EXECUTOR ) :
175+ if self .flags .threadless and self . flags . local_executor :
175176 self ._start_local ()
176177 self .selector .register (self .sock , selectors .EVENT_READ )
177178 while not self .running .is_set ():
@@ -180,7 +181,7 @@ def run(self) -> None:
180181 pass
181182 finally :
182183 self .selector .unregister (self .sock )
183- if self .flags .local_executor == int ( DEFAULT_LOCAL_EXECUTOR ) :
184+ if self .flags .threadless and self . flags . local_executor :
184185 self ._stop_local ()
185186 self .sock .close ()
186187 logger .debug ('Acceptor#%d shutdown' , self .idd )
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ def run(self) -> None:
429429 data = wqfileno ,
430430 )
431431 assert self .loop
432- # logger.debug('Working on {0} works'.format(len(self.works)))
432+ logger .debug ('Working on {0} works' .format (len (self .works )))
433433 self .loop .create_task (self ._run_forever ())
434434 self .loop .run_forever ()
435435 except KeyboardInterrupt :
Original file line number Diff line number Diff line change 2525
2626from .common .utils import bytes_
2727from .common .flag import FlagParser , flags
28- from .common .constants import DEFAULT_ENABLE_SSH_TUNNEL , DEFAULT_LOCAL_EXECUTOR , DEFAULT_LOG_FILE
28+ from .common .constants import DEFAULT_ENABLE_SSH_TUNNEL , DEFAULT_LOG_FILE
2929from .common .constants import DEFAULT_OPEN_FILE_LIMIT , DEFAULT_PLUGINS , DEFAULT_VERSION
3030from .common .constants import DEFAULT_ENABLE_DASHBOARD , DEFAULT_WORK_KLASS , DEFAULT_PID_FILE
3131from .common .constants import DEFAULT_LOG_FORMAT , DEFAULT_LOG_LEVEL , IS_WINDOWS
@@ -242,7 +242,7 @@ def shutdown(self) -> None:
242242 @property
243243 def remote_executors_enabled (self ) -> bool :
244244 return self .flags .threadless and \
245- not ( self .flags .local_executor == int ( DEFAULT_LOCAL_EXECUTOR ))
245+ not self .flags .local_executor
246246
247247 def _write_pid_file (self ) -> None :
248248 if self .flags .pid_file :
You can’t perform that action at this time.
0 commit comments