Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Re-add stderr and stdout info
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreso committed May 4, 2021
1 parent b7297ad commit 53b0e65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/job_runner/reporting/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
)
import queue
import threading
from pathlib import Path
from job_runner.util.client import Client

_FM_JOB_START = "com.equinor.ert.forward_model_job.start"
Expand Down Expand Up @@ -98,8 +99,12 @@ def _job_handler(self, msg):
{
"type": _FM_JOB_START,
"source": job_path,
"datacontenttype": "application/json",
},
{
"stdout": str(Path(msg.job.std_out).resolve()),
"stderr": str(Path(msg.job.std_err).resolve()),
},
None,
)
)
if not msg.success():
Expand Down
2 changes: 2 additions & 0 deletions tests/job_runner/test_event_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def test_report_with_successful_start_message_argument(unused_tcp_port):
event = json.loads(lines[0])
assert event["type"] == _FM_JOB_START
assert event["source"] == "/ert/ee/ee_id/real/0/step/0/job/0"
assert os.path.basename(event["data"]["stdout"]) == "stdout"
assert os.path.basename(event["data"]["stderr"]) == "stderr"


def test_report_with_failed_start_message_argument(unused_tcp_port):
Expand Down

0 comments on commit 53b0e65

Please sign in to comment.