wakeup.cc 773 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Gearman server and library
  2. * Copyright (C) 2011 DataDifferential
  3. * All rights reserved.
  4. *
  5. * Use and distribution licensed under the BSD license. See
  6. * the COPYING file in the parent directory for full text.
  7. */
  8. #include <config.h>
  9. #include <stdlib.h>
  10. #include <libgearman-server/wakeup.h>
  11. const char *gearmand_strwakeup(gearmand_wakeup_t arg)
  12. {
  13. switch (arg)
  14. {
  15. case GEARMAND_WAKEUP_PAUSE:
  16. return "GEARMAND_WAKEUP_PAUSE";
  17. case GEARMAND_WAKEUP_SHUTDOWN:
  18. return "GEARMAND_WAKEUP_SHUTDOWN";
  19. case GEARMAND_WAKEUP_SHUTDOWN_GRACEFUL:
  20. return "GEARMAND_WAKEUP_SHUTDOWN_GRACEFUL";
  21. case GEARMAND_WAKEUP_CON:
  22. return "GEARMAND_WAKEUP_CON";
  23. case GEARMAND_WAKEUP_RUN:
  24. return "GEARMAND_WAKEUP_RUN";
  25. default:
  26. abort();
  27. }
  28. }