Commit 23af509d authored by Ciarán Ó Rourke's avatar Ciarán Ó Rourke
Browse files

Removed old debugging print functions

parent 1bb24039
......@@ -45,11 +45,9 @@ class HandlerFactory : public proxygen::RequestHandlerFactory {
proxygen::RequestHandler*, proxygen::HTTPMessage* headers) noexcept override
{
if (headers->getMethod() == proxygen::HTTPMethod::GET) {
std::cout << "Chose get" << std::endl;
return new fiphoboserver::StaticHandler;
}
else if (headers->getMethod() == proxygen::HTTPMethod::PUT) {
std::cout << "Chose put" << std::endl;
return new fiphoboserver::PushRequestHandler;
}
else {
......@@ -61,7 +59,6 @@ class HandlerFactory : public proxygen::RequestHandlerFactory {
int main(int argc, char* argv[])
{
std::cout << "here1" << std::endl;
folly::init(&argc, &argv, true);
std::vector<proxygen::HTTPServer::IPConfig> IPs = {
......@@ -74,7 +71,6 @@ int main(int argc, char* argv[])
CHECK_GT(FLAGS_threads, 0);
}
std::cout << "here2" << std::endl;
proxygen::HTTPServerOptions options;
options.threads = static_cast<size_t>(FLAGS_threads);
options.idleTimeout = std::chrono::milliseconds(60000);
......@@ -83,18 +79,15 @@ int main(int argc, char* argv[])
options.handlerFactories =
proxygen::RequestHandlerChain().addThen<HandlerFactory>().build();
options.h2cEnabled = true;
std::cout << "here3" << std::endl;
auto diskIOThreadPool = std::make_shared<folly::CPUThreadPoolExecutor>(
FLAGS_threads,
std::make_shared<folly::NamedThreadFactory>("FIFOIOThread"));
folly::setCPUExecutor(diskIOThreadPool);
std::cout << "here4" << std::endl;
proxygen::HTTPServer server(std::move(options));
server.bind(IPs);
std::cout << "here5" << std::endl;
// Start HTTPServer mainloop in a separate thread
std::thread t([&]() { server.start(); });
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment