text: #include "grid-content/contentServer/corba/client/ClientImplementation.h"
  #include "grid-content/contentServer/http/client/ClientImplementation.h"
  // #include "grid-content/contentServer/postgres/PostgresImplementation.h"
  #include "grid-content/contentServer/redis/RedisImplementation.h"
  #include <macgyver/Exception.h>
  #include "grid-files/common/GeneralFunctions.h"
  
  using namespace SmartMet;
  
  
  int main(int argc, char *argv[])
  {
    try
    {
      if (argc < 3)
      {
        fprintf(stdout,"USAGE: cs_deleteGenerationInfoListByProducerName <sessionId> <producerName> [[-http <url>]|[-redis <address> <port> <tablePrefix>]]\n");
        return -1;
      }
  
      T::SessionId sessionId = toInt64(argv[1]);
      std::string producerName = argv[2];
  
      ContentServer::ServiceInterface *service = nullptr;
  
      if (strcmp(argv[argc-2],"-http") == 0)
      {
        ContentServer::HTTP::ClientImplementation *httpClient = new ContentServer::HTTP::ClientImplementation();
        httpClient->init(argv[argc-1]);
        service = httpClient;
      }
      else
      if (argc > 4  &&  strcmp(argv[argc-4],"-redis") == 0)
      {
        ContentServer::RedisImplementation *redis = new ContentServer::RedisImplementation();
        redis->init(argv[argc-3],toInt64(argv[argc-2]),argv[argc-1]);
        service = redis;
      }
      else
      {
        char *serviceIor = getenv("SMARTMET_CS_IOR");
  
        if (strcmp(argv[argc-2],"-ior") == 0)
          serviceIor = argv[argc-1];
  
        if (serviceIor == nullptr)
        {
          fprintf(stdout,"Service IOR not defined!\n");
          return -2;
        }
  
        ContentServer::Corba::ClientImplementation *corbaClient = new ContentServer::Corba::ClientImplementation();
        corbaClient->init(serviceIor);
        service = corbaClient;
      }
  
  
      if (service == nullptr)
      {
        fprintf(stdout,"ERROR : Service not defined!\n");
        return -3;
      }
  
      unsigned long long startTime = getTime();
      int result = service->deleteGenerationInfoListByProducerName(sessionId,producerName);
      unsigned long long endTime = getTime();
  
      if (result != 0)
      {
        fprintf(stdout,"ERROR (%d) : %s\n",result,ContentServer::getResultString(result).c_str());
        return -3;
      }
  
      // ### Result:
      printf("OK\n");
  
      printf("\nTIME : %f sec\n\n",(float)(endTime-startTime)/1000000);
  
      delete service;
  
      return 0;
    }
    catch (Fmi::Exception& e)
    {
      Fmi::Exception exception(BCP,"Service call failed!",nullptr);
      exception.printError();
      return -4;
    }
  }
  
  