Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /swf-monitor/src/monitor_app/state_descriptions.py was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 """Short human descriptions for state values shown in the monitor.
0002 
0003 
0004 Used by ``cell_fmt.fill_cell`` and the ``state_class`` filter variants to
0005 attach a ``title=`` attribute to state-colored cells, so hovering a
0006 "finished" or "failed" cell reveals what the state actually means.
0007 
0008 Keys are lowercase; lookups go via ``state_description(value)``.
0009 Unknown states return '' (no tooltip) — better silent than wrong.
0010 """
0011 
0012 # Coverage: PanDA job/task states, workflow execution states, STF/run
0013 # lifecycle states, agent statuses, log levels. Additions welcome;
0014 # missing entries just omit the tooltip (no error).
0015 STATE_DESCRIPTIONS = {
0016     # Log levels
0017     'debug': 'Debug-level log — verbose, developer-facing',
0018     'info': 'Informational log — normal operation',
0019     'warning': 'Warning — possible issue, operation continues',
0020     'error': 'Error — operation failed but service continues',
0021     'critical': 'Critical — service-level failure',
0022 
0023     # PanDA task / job states
0024     'defined': 'Defined but not yet queued for execution',
0025     'assigned': 'Assigned to a computing resource',
0026     'waiting': 'Waiting on upstream dependency',
0027     'pending': 'Queued, not yet started',
0028     'activated': 'Scheduled to run, awaiting pilot',
0029     'starting': 'Pilot starting the job',
0030     'sent': 'Dispatched to the pilot',
0031     'running': 'Actively executing',
0032     'transferring': 'Output transfer in progress',
0033     'holding': 'Awaiting follow-up action',
0034     'merging': 'Merging outputs',
0035     'finished': 'Completed successfully',
0036     'failed': 'Completed with failure',
0037     'cancelled': 'Cancelled by user or system',
0038     'closed': 'Closed — no further processing',
0039     'broken': 'Broken task — cannot recover automatically',
0040     'done': 'Task complete, all jobs finished',
0041     'aborted': 'Aborted before completion',
0042     'exhausted': 'All retry attempts exhausted',
0043     'obsolete': 'Superseded by a newer task',
0044     'ready': 'Ready to process',
0045     'scouting': 'Scout jobs running to probe resource',
0046     'scouted': 'Scout jobs complete, production can proceed',
0047     'prepared': 'Inputs prepared, awaiting job generation',
0048     'registered': 'Registered in the system',
0049     'submitting': 'Job submission in progress',
0050     'throttled': 'Rate-limited by the broker',
0051     'paused': 'Paused — resumable',
0052 
0053     # Workflow / agent states
0054     'ok': 'Healthy, sending heartbeats',
0055     'unknown': 'State unknown — no recent heartbeat',
0056     'exited': 'Process exited',
0057     'stopped': 'Stopped cleanly',
0058     'processing': 'Processing in progress',
0059     'processed': 'Processing complete',
0060     'active': 'Active / in progress',
0061     'completed': 'Completed',
0062     'idle': 'Idle, waiting for work',
0063     'skipped': 'Skipped by policy or upstream decision',
0064 }
0065 
0066 
0067 def state_description(value):
0068     """Return the short description for a state, or '' if unknown."""
0069     if not value:
0070         return ''
0071     return STATE_DESCRIPTIONS.get(str(value).lower(), '')