Skip to content

Commit

Permalink
refactoring the files inside supervisors folder
Browse files Browse the repository at this point in the history
  • Loading branch information
yernazarov committed Apr 13, 2022
1 parent 267aceb commit 8558c12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions uvicorn/supervisors/basereload.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import signal
import threading
from socket import socket
from types import FrameType
from typing import Callable, List, Optional

import click
Expand Down Expand Up @@ -33,7 +32,7 @@ def __init__(
self.pid = os.getpid()
self.reloader_name: Optional[str] = None

def signal_handler(self, sig: signal.Signals, frame: FrameType) -> None:
def signal_handler(self) -> None:
"""
A signal handler that is registered with the parent process.
"""
Expand Down Expand Up @@ -64,7 +63,6 @@ def startup(self) -> None:
self.process.start()

def restart(self) -> None:

self.process.terminate()
self.process.join()

Expand Down
7 changes: 3 additions & 4 deletions uvicorn/supervisors/multiprocess.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import click
import logging
import os
import signal
import threading

from multiprocessing.context import SpawnProcess
from socket import socket
from types import FrameType
from typing import Callable, List, Optional

import click

from uvicorn._subprocess import get_subprocess
from uvicorn.config import Config

Expand All @@ -34,7 +33,7 @@ def __init__(
self.should_exit = threading.Event()
self.pid = os.getpid()

def signal_handler(self, sig: signal.Signals, frame: FrameType) -> None:
def signal_handler(self) -> None:
"""
A signal handler that is registered with the parent process.
"""
Expand Down
1 change: 0 additions & 1 deletion uvicorn/supervisors/watchgodreload.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pathlib import Path
from socket import socket
from typing import TYPE_CHECKING, Callable, Dict, List, Optional

from watchgod import DefaultWatcher

from uvicorn.config import Config
Expand Down

0 comments on commit 8558c12

Please sign in to comment.