mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-10 18:11:49 -05:00
14 lines
362 B
Python
14 lines
362 B
Python
from channels import Group
|
|
from channels.sessions import channel_session
|
|
|
|
|
|
@channel_session
|
|
def job_event_connect(message):
|
|
job_id = message.content['path'].strip('/')
|
|
message.channel_session['job_id'] = job_id
|
|
Group("job_events-%s" % job_id).add(message.reply_channel)
|
|
|
|
def emit_channel_notification(event, payload):
|
|
Group(event).send(payload)
|
|
|