mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 02:31:00 +00:00
17 lines
439 B
Python
17 lines
439 B
Python
from django.http import HttpResponse
|
|
from django.views import View
|
|
|
|
from stator.runner import StatorRunner
|
|
from users.models import Follow
|
|
|
|
|
|
class RequestRunner(View):
|
|
"""
|
|
Runs a Stator runner within a HTTP request. For when you're on something
|
|
serverless.
|
|
"""
|
|
|
|
async def get(self, request):
|
|
runner = StatorRunner([Follow])
|
|
handled = await runner.run()
|
|
return HttpResponse(f"Handled {handled}")
|