common.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ###############################################################################
  2. # #
  3. # L3q - Light, light, lightweight queue #
  4. # Copyright (C) 2023 Marcus Pedersén marcus.pedersen@slu.se #
  5. # #
  6. # This program is free software: you can redistribute it and/or modify #
  7. # it under the terms of the GNU General Public License as published by #
  8. # the Free Software Foundation, either version 3 of the License, or #
  9. # (at your option) any later version. #
  10. # #
  11. # This program is distributed in the hope that it will be useful, #
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of #
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  14. # GNU General Public License for more details. #
  15. # #
  16. # You should have received a copy of the GNU General Public License #
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>. #
  18. # #
  19. ###############################################################################
  20. '''
  21. Module contains common classes
  22. and functions for l3q,
  23. required by both daemon and client programs.
  24. '''
  25. class L3QAction:
  26. '''
  27. Class that represent all actions
  28. that can be sent to l3q daemon
  29. and actions supported by daemon.
  30. '''
  31. ADD_PARA = 'ADD_PARA'
  32. ADD_SEQ = 'ADD_SEQ'
  33. CANCEL_JOB = 'CANCEL_JOB'
  34. GET_QUEUE = 'GET_QUEUE'
  35. GET_JOB_INFO = 'GET_JOB_INFO'
  36. GET_TASK_LIST = 'GET_TASK_LIST'
  37. GET_TASK_INFO = 'GET_TASK_INFO'
  38. GET_HISTORY = 'GET_HISTORY'
  39. GET_NODE_STATUS = 'GET_NODE_STATUS'
  40. VALIDATE_KEY = 'VALIDATE_KEY'
  41. ADD_NODE = 'ADD_NODE'
  42. REMOVE_NODE = 'REMOVE_NODE'
  43. SET_NODE_OFFLINE = 'SET_NODE_OFFLINE'
  44. SET_NODE_ONLINE = 'SET_NODE_ONLINE'