Skip to content

Commit

Permalink
logs: basic workflow status to file
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Rodriguez <diego.rodriguez@cern.ch>
  • Loading branch information
Diego Rodriguez committed Jun 2, 2017
1 parent 8596109 commit 5481bb9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions reana_workflow_engine_yadage/tasks.py
Expand Up @@ -24,6 +24,7 @@

import logging
import os
from glob import glob

import zmq
from yadage.clihelpers import setupbackend_fromstring
Expand Down Expand Up @@ -66,11 +67,21 @@ def run_yadage_workflow_standalone(workflow_uuid, ctx):
loginterval=5,
backend=cap_backend) as ys:

for status_file in glob(os.path.join(analysis_directory, '.status.*')):
os.remove(status_file)

open(os.path.join(analysis_directory, '.status.running'), 'a').close()

ys.adage_argument(additional_trackers=[
ZeroMQTracker(socket=socket, identifier=workflow_uuid)])
log.info('added zmq tracker.. ready to go..')
log.info('zmq publishing under: %s', workflow_uuid)

for status_file in glob(os.path.join(analysis_directory, '.status.*')):
os.remove(status_file)

open(os.path.join(analysis_directory, '.status.finished'), 'a').close()

log.info('workflow done')


Expand Down

0 comments on commit 5481bb9

Please sign in to comment.