mesh routing now fully database-bound
This commit is contained in:
parent
ee539f678a
commit
66810b20b0
6 changed files with 94 additions and 93 deletions
|
@ -1,5 +1,6 @@
|
|||
import time
|
||||
|
||||
from asgiref.sync import async_to_sync
|
||||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.http import Http404
|
||||
|
@ -85,10 +86,10 @@ class MeshMessageForm(forms.Form):
|
|||
recipients = self.get_recipients()
|
||||
for recipient in recipients:
|
||||
print('sending to ', recipient)
|
||||
MeshMessage.fromjson({
|
||||
async_to_sync(MeshMessage.fromjson({
|
||||
'dst': recipient,
|
||||
**msg_data,
|
||||
}).send()
|
||||
}).send)()
|
||||
|
||||
|
||||
class MeshRouteRequestForm(MeshMessageForm):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue