diff options
author | Andrew Godwin | 2022-11-08 23:06:29 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-09 22:29:49 -0700 |
commit | 61c324508e62bb640b4526183d0837fc57d742c2 (patch) | |
tree | 618ee8c88ce8a28224a187dc33b7c5fad6831d04 /stator/views.py | |
parent | 8a0a7558894afce8d25b7f0dc16775e899b72a94 (diff) | |
download | takahe-61c324508e62bb640b4526183d0837fc57d742c2.tar.gz takahe-61c324508e62bb640b4526183d0837fc57d742c2.tar.bz2 takahe-61c324508e62bb640b4526183d0837fc57d742c2.zip |
Midway point in task refactor - changing direction
Diffstat (limited to 'stator/views.py')
-rw-r--r-- | stator/views.py | 17 |
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}") |