gearman_worker_options.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ==============
  2. Worker Options
  3. ==============
  4. --------
  5. SYNOPSIS
  6. --------
  7. #include <libgearman/gearman.h>
  8. .. c:type:: gearman_worker_options_t
  9. .. c:function:: gearman_worker_options_t gearman_worker_options(const gearman_worker_st *worker)
  10. .. c:function:: void gearman_worker_add_options(gearman_worker_st *worker, gearman_worker_options_t options)
  11. .. c:function:: void gearman_worker_remove_options(gearman_worker_st *worker, gearman_worker_options_t options)
  12. .. c:function:: void gearman_worker_set_options(gearman_worker_st *worker, gearman_worker_options_t options)
  13. .. deprecated:: 0.21
  14. -----------
  15. DESCRIPTION
  16. -----------
  17. :c:func:`gearman_worker_options` returns the :c:type:`gearman_worker_options_t` for :c:type:`gearman_worker_st`. You enable options via :c:func:`gearman_worker_add_options` and disable options via :c:func:`gearman_worker_remove_options`.
  18. The currently supported options are:
  19. .. c:type: GEARMAN_WORKER_NON_BLOCKING
  20. Enable non-block IO for the worker.
  21. .. c:type:: GEARMAN_WORKER_GRAB_UNIQ
  22. Only grab jobs that have been assigned unique values. This is useful for workers who only want to worker with background jobs.
  23. .. c:type:: GEARMAN_WORKER_TIMEOUT_RETURN
  24. Has a return timeout been set for the worker.
  25. ------------
  26. RETURN VALUE
  27. ------------
  28. Various
  29. ----
  30. HOME
  31. ----
  32. To find out more information please check:
  33. `https://gearman.org/gearmand/ <https://gearman.org/gearmand/>`_
  34. .. seealso::
  35. :manpage:`gearmand(8)` :manpage:`libgearman(3)`