Skip to content

Commit

Permalink
update the process editing output
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Jun 21, 2023
1 parent 8bd4a6b commit 128c038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions pygeoweaver/sc_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ def sync(process_id: str, local_path: typing.Union[str, os.PathLike], direction:
with open(local_path, "r") as f:
f_content = f.read()
process_prev_state["code"] = f_content
requests.post(
f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/edit/process",
data=json.dumps(process_prev_state),
headers={"Content-Type": "application/json"},
)
response = requests.post(
f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/edit/process",
data=json.dumps(process_prev_state),
headers={"Content-Type": "application/json"},
)
if response.status_code == 200:
print("Process update was successful")
else:
print("Update failed with status code:", response.status_code)
else:
raise Exception(
"Please specify the direction to sync. Choices - [UPLOAD, DOWNLOAD]"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pygeoweaver"
version = "0.7.3"
version = "0.7.4"
authors = [
{ name="Geoweaver team", email="[email protected]" },
]
Expand All @@ -22,7 +22,7 @@ classifiers = [

[tool.poetry]
name = "pygeoweaver"
version = "0.7.3"
version = "0.7.4"
description = "This is a wrapper package of the Geoweaver app."
authors = ["Geoweaver team <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 128c038

Please sign in to comment.