@Override
  public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    if (!Configuration.isRequestFromTaskQueue(req, resp)) {
      return;
    }

    String devicesJSon = req.getParameter("devices");
    if (devicesJSon == null) {
      log.warning("Missing 'devices' argument on task queue request. This indicates a bug");
      return;
    }
    String[] devices = null;
    try {
      devices = new Gson().fromJson(devicesJSon, String[].class);
    } catch (JsonSyntaxException e) {
      log.warning(
          "Invalid format of 'devices' argument on task queue request. This indicates a bug");
      return;
    }
    removeDevices(devices);
  }