File: ZombieAttr.rst

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (73 lines) | stat: -rw-r--r-- 2,578 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ecflow.ZombieAttr
/////////////////


.. py:class:: ZombieAttr
   :module: ecflow

   Bases: :py:class:`~Boost.Python.instance`

The :term:`zombie` attribute defines how a :term:`zombie` should be handled in an automated fashion

Very careful consideration should be taken before this attribute is added
as it may hide a genuine problem.
It can be added to any :term:`node`. But is best defined at the :term:`suite` or :term:`family` level.
If there is no zombie attribute the default behaviour is to block the init,complete,abort :term:`child command`.
and *fob* the event,label,and meter :term:`child command`
This attribute allows the server to make a automated response.
Please see: :py:class:`ecflow.ZombieType`, :py:class:`ecflow.ChildCmdType`, :py:class:`ecflow.ZombieUserActionType`

Constructor::

   ZombieAttr(ZombieType,ChildCmdTypes, ZombieUserActionType, lifetime)
      ZombieType            : Must be one of ZombieType.ecf, ZombieType.path, ZombieType.user
      ChildCmdType          : A list(ChildCmdType) of Child commands. Can be left empty in
                              which case the action affect all child commands
      ZombieUserActionType  : One of [ fob, fail, block, remove, adopt ]
      int lifetime<optional>: Defines the life time in seconds of the zombie in the server.
                              On expiration, zombie is removed automatically

Usage:

.. code-block:: python

   # Add a zombie attribute so that child commands(i.e ecflow_client --init)
   # will fail the job if it is a zombie process.
   s1 = Suite('s1')
   child_list = [ ChildCmdType.init, ChildCmdType.complete, ChildCmdType.abort ]
   s1.add_zombie( ZombieAttr(ZombieType.ecf, child_list, ZombieUserActionType.fob))

   # create the zombie as part of the node constructor
   s1 = Suite('s1',
              ZombieAttr(ZombieType.ecf, child_list, ZombieUserActionType.fail))


.. py:property:: ZombieAttr.child_cmds
   :module: ecflow

The list of child commands. If empty action applies to all child cmds


.. py:method:: ZombieAttr.empty( (ZombieAttr)arg1) -> bool :
   :module: ecflow

Return true if the attribute is empty


.. py:method:: ZombieAttr.user_action( (ZombieAttr)arg1) -> ZombieUserActionType :
   :module: ecflow

The automated action to invoke, when zombies arise


.. py:method:: ZombieAttr.zombie_lifetime( (ZombieAttr)arg1) -> int :
   :module: ecflow

Returns the lifetime in seconds of :term:`zombie` in the server


.. py:method:: ZombieAttr.zombie_type( (ZombieAttr)arg1) -> ZombieType :
   :module: ecflow

Returns the :term:`zombie type`