mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Runs the pre-commit hooks over all the Python files
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import json
|
||||
|
||||
from asgiref.sync import async_to_sync
|
||||
from channels.exceptions import DenyConnection, AcceptConnection
|
||||
from channels.exceptions import AcceptConnection
|
||||
from channels.exceptions import DenyConnection
|
||||
from channels.generic.websocket import WebsocketConsumer
|
||||
|
||||
|
||||
@@ -14,13 +15,15 @@ class StatusConsumer(WebsocketConsumer):
|
||||
raise DenyConnection()
|
||||
else:
|
||||
async_to_sync(self.channel_layer.group_add)(
|
||||
"status_updates", self.channel_name
|
||||
"status_updates",
|
||||
self.channel_name,
|
||||
)
|
||||
raise AcceptConnection()
|
||||
|
||||
def disconnect(self, close_code):
|
||||
async_to_sync(self.channel_layer.group_discard)(
|
||||
"status_updates", self.channel_name
|
||||
"status_updates",
|
||||
self.channel_name,
|
||||
)
|
||||
|
||||
def status_update(self, event):
|
||||
|
Reference in New Issue
Block a user