#include "demo_guard.h"


RENDER(Request& context)
{
	if(!test_demo_request_allowed(context))
	{
		test_demo_render_restricted_text(context, "Task Status", "inspect background task state");
		return;
	}
	String task_name = first(context.get["task-name"], "example-task");

	print("Task Name: ", task_name, "\n");
	print("Task ID: ", task_pid(task_name), "\n");
	print("Task Running: ", task_pid(task_name) == 0 ? "no" : "yes", "\n");
}
