forked from DGNum/gestioCOF
44 lines
1 KiB
Python
44 lines
1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import (absolute_import, division,
|
|
print_function, unicode_literals)
|
|
from builtins import *
|
|
|
|
from channels import Group
|
|
from channels.generic.websockets import JsonWebsocketConsumer
|
|
|
|
class KPsul(JsonWebsocketConsumer):
|
|
|
|
# Set to True if you want them, else leave out
|
|
strict_ordering = False
|
|
slight_ordering = False
|
|
|
|
def connection_groups(self, **kwargs):
|
|
return ['kfet.kpsul']
|
|
|
|
def connect(self, message, **kwargs):
|
|
pass
|
|
|
|
def receive(self, content, **kwargs):
|
|
pass
|
|
|
|
def disconnect(self, message, **kwargs):
|
|
pass
|
|
|
|
class KfetOpen(JsonWebsocketConsumer):
|
|
|
|
# Set to True if you want them, else leave out
|
|
strict_ordering = False
|
|
slight_ordering = False
|
|
|
|
def connection_groups(self, **kwargs):
|
|
return ['kfet.is_open']
|
|
|
|
def connect(self, message, **kwargs):
|
|
pass
|
|
|
|
def receive(self, content, **kwargs):
|
|
pass
|
|
|
|
def disconnect(self, message, **kwargs):
|
|
pass
|