Skip to content

Commit

Permalink
benchmark: make script py36 friendly
Browse files Browse the repository at this point in the history
- replaces datetime.fromisoformat with datetime.strptime as former is not supported in py36

closes #569
  • Loading branch information
Vladyslav Moisieienkov committed Oct 29, 2021
1 parent b71b8d9 commit 0fd3b15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/reana_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ def _workflows_finished(df: pd.DataFrame) -> bool:


def _convert_str_date_to_epoch(series: pd.Series) -> pd.Series:
datetime_format = "%Y-%m-%dT%H:%M:%S"
return series.apply(
lambda x: int(time.mktime(datetime.fromisoformat(x).timetuple()))
lambda x: int(time.mktime(datetime.strptime(x, datetime_format).timetuple()))
)


Expand Down

0 comments on commit 0fd3b15

Please sign in to comment.