cancel
Showing results for 
Search instead for 
Did you mean: 

WorkFlow question

WorkFlow question

XTRMUser
Contributor

I have a couple of workflows that take time to run (one is about a minute, the other is a few minutes). Is there some way I can have an update showing on the screen to say it still running? Both of these workflows traverse all the switches, so switch IP's would be one possibility.

Thanks.

1 ACCEPTED SOLUTION

Markus_Nikulski
Extreme Employee

use the Workflow Dashboard, please. You will be able to see if a workflow is running or witch which results in they ended. But you will not see any activity details during runtime.

Markus_Nikulski_0-1709224353380.png

 

View solution in original post

4 REPLIES 4

Markus_Nikulski
Extreme Employee

I forgot to mention that you can use the Python log facility to write to STDOUT and a file. This gives you several good opportunities. in regard to real-time log inspection (tailing the file) and enabling or disabling debug logs as required.

Below a code example.

 

 

import logging

logFile = '/tmp/'+ emc_vars['workflowName'].replace(' ', '_') +'_'+ time.strftime("%Y-%m-%d_%H-%M-%S") +'.log'

log      = None

########################################################################

def setupLogger():

    global log

    log = logging.getLogger()

    log.setLevel( logging.DEBUG )

   

    screen = logging.StreamHandler()

    screen.setLevel( logging.INFO )

    screen_formatter = logging.Formatter('%(asctime)s.%(msecs)03d %(levelname)-7s %(message)s', datefmt='%H:%M:%S')

    screen.setFormatter( screen_formatter )

    log.addHandler( screen )

   

    if emc_vars['DEBUG'].lower() == 'true':

        log.info("write LOG file " + logFile)

        file = logging.FileHandler(logFile, mode='a', encoding='utf-8')

        file.setLevel( logging.DEBUG )

        formatter = logging.Formatter('%(asctime)s  %(levelname)-7s [%(filename)s:%(lineno)d] %(message)s')

        file.setFormatter( formatter )

        log.addHandler( file )

   

########################################################################

def main():

    setupLogger()

    log.info("Hello World!")

########################################################################

main()

Thanks. I'll look into this as well.

Markus_Nikulski
Extreme Employee

use the Workflow Dashboard, please. You will be able to see if a workflow is running or witch which results in they ended. But you will not see any activity details during runtime.

Markus_Nikulski_0-1709224353380.png

 

Thanks for this. I was thinking this would be the solution, but hoping for better. 

GTM-P2G8KFN