synctoAsync
This commit is contained in:
@@ -2,6 +2,7 @@ import requests
|
||||
from asgiref.sync import sync_to_async
|
||||
from .models import saldoModel
|
||||
import datetime
|
||||
|
||||
async def req():
|
||||
|
||||
results = await sync_to_async(get_saldo, thread_sensitive=True)
|
||||
@@ -19,6 +20,4 @@ def get_saldo(request):
|
||||
return {
|
||||
'saldo':Saldo,
|
||||
'fecha': datetime.date.today()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user