Skip to content

Commit

Permalink
undeclared local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
shawwwn committed Mar 23, 2019
1 parent 6319f50 commit 35e83d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scylla/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def main(args) -> int:
create_db_tables()

s = Scheduler()
p_web, p_proxy = None, None

try:
# scheduler
Expand All @@ -74,10 +75,9 @@ def main(args) -> int:
if s.is_alive():
s.join()
logger.info('scheduler done.')
if p_web:
if p_web or p_proxy:
p_web.join()
if p_proxy:
proxy.join()
p_proxy.join()

except (KeyboardInterrupt, SystemExit):
logger.info('catch KeyboardInterrupt, exiting...')
Expand Down
4 changes: 2 additions & 2 deletions scylla/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def validate_ips(validator_queue: Queue, validator_pool: ThreadPoolExecutor, run
except (KeyboardInterrupt, SystemExit):
break
except queue.Empty:
logger.info('validator_thread has timed out.')
logger.debug('validator_thread has timed out.')
break

logger.debug('validator_thread exited.')

validator_pool.shutdown(wait=True)
logger.debug('validator_pool join\'ed!')
logger.debug('validator_pool exited.')


def cron_schedule(scheduler, run_once=False):
Expand Down

0 comments on commit 35e83d0

Please sign in to comment.