Skip to content

Commit

Permalink
Merge branch 'feature/add-connector-subtype' of github.com:Riminder/h…
Browse files Browse the repository at this point in the history
…rflow-connectors into feature/add-connector-subtype
  • Loading branch information
thomas committed Sep 5, 2024
2 parents aba8233 + 912611a commit 9fb79a6
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 35 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@



## v4.21.0 (2024-09-05)

### Feature

* feat: use last hrflow sdk version 4.2.0 ([`4489706`](https://github.com/Riminder/hrflow-connectors/commit/4489706c6890c4d028e7fe0e5d71c0487a562113))


## v4.20.1 (2024-09-02)

### Fix
Expand Down
56 changes: 52 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hrflow-connectors"
version = "4.20.1"
version = "4.21.0"
description = "hrflow-connectors is an open source project created by HrFlow.ai to allow developers to connect easily HR ecosystem component."
license = "Apache-2.0"
authors = ["HrFlow.ai <support+hrflow_connectors@hrflow.ai>"]
Expand All @@ -19,7 +19,7 @@ exclude = ["Makefile", ".pre-commit-config.yaml", "manifest.json", "tests", "poe
python = "^3.8.1"
pydantic = "1.10.8"
Jinja2 = "^3.0.3"
hrflow = "^3.3.0"
hrflow = "^4.2.0"
requests = "^2.27.1"
boto3 = {version = "^1.24.66", optional = true}
simple-salesforce = "^1.12.4"
Expand Down
31 changes: 2 additions & 29 deletions src/hrflow_connectors/connectors/hrflow/warehouse/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def write(
)
for reference in references_to_archive:
response = hrflow_client.job.storing.archive(
board_key=parameters.board_key, reference=reference, is_archive=1
board_key=parameters.board_key, reference=reference
)
if response["code"] >= 400:
adapter.error(
Expand Down Expand Up @@ -237,35 +237,8 @@ def write(
failed_jobs.append(job)
continue
elif response["code"] == 200:
archived_at = response["data"].get("archived_at")
job_key = response["data"]["key"]
if archived_at is None:
if parameters.update_content:
response = hrflow_client.job.storing.edit(
board_key=parameters.board_key, key=job_key, job_json=job
)
if response["code"] >= 400:
adapter.error(
"Failed to edit job board_key={} "
"reference={} response={}".format(
parameters.board_key, reference, response
)
)
failed_jobs.append(job)
continue
else:
response = hrflow_client.job.storing.archive(
board_key=parameters.board_key, reference=reference, is_archive=0
)
if response["code"] >= 400:
adapter.error(
"Failed to unarchive job board_key={} "
"reference={} response={}".format(
parameters.board_key, reference, response
)
)
failed_jobs.append(job)
continue
if parameters.update_content:
response = hrflow_client.job.storing.edit(
board_key=parameters.board_key, key=job_key, job_json=job
)
Expand Down

0 comments on commit 9fb79a6

Please sign in to comment.