Skip to content

Commit cf47dc5

Browse files
authored
Merge pull request #85 from moj-analytical-services/dev
Dev
2 parents b2937e2 + 1acdfeb commit cf47dc5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## v2.2.1
8+
### Change
9+
- Updated output from `GlueJob` class function `wait_for_job_completion()` (when verbose is set to True), now states how long Glue has been running the job.
10+
711
## v2.2.0
812
### Added
913
- Fixed bug where glue_specific would not write to json or be a key in dictionary from TableMeta class `to_dict()` method.

etl_manager/etl.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,12 @@ def wait_for_completion(self, verbose=False):
403403

404404
status = self.job_status
405405
status_code = status["JobRun"]["JobRunState"]
406-
status_error = status["JobRun"].get("ErrorMessage", "Unknown")
406+
status_error = status["JobRun"].get("ErrorMessage", "n/a")
407+
exec_time = status["JobRun"].get("ExecutionTime", "n/a")
407408

408409
if verbose:
409-
timestamp = datetime.datetime.now().strftime("%Y-%B-%d %H:%M:%S")
410-
print("{}: Code: {} | Error: {}".format(timestamp, status_code, status_error))
410+
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
411+
print(f"{timestamp}: Job State: {status_code} | Execution Time: {exec_time} (s) | Error: {status_error}")
411412

412413
if status_code == "SUCCEEDED":
413414
break

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='etl_manager',
5-
version='2.2.0',
5+
version='2.2.1',
66
packages=find_packages(exclude=['tests*']),
77
license='MIT',
88
description='A python package to manage etl processes on AWS',

0 commit comments

Comments
 (0)