summaryrefslogtreecommitdiffstats
path: root/stator/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'stator/views.py')
-rw-r--r--stator/views.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/stator/views.py b/stator/views.py
new file mode 100644
index 0000000..ef09b8e
--- /dev/null
+++ b/stator/views.py
@@ -0,0 +1,17 @@
+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}")