accsyn-python-api 3.3.0__tar.gz → 3.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/PKG-INFO +1 -1
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/pyproject.toml +1 -1
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/source/accsyn_api/_version.py +1 -1
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/source/accsyn_api/session.py +8 -3
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/README.md +0 -0
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/source/accsyn_api/__init__.py +0 -0
- {accsyn_python_api-3.3.0 → accsyn_python_api-3.3.1}/source/accsyn_api/_devtools.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "accsyn-python-api"
|
|
7
|
-
version = "3.3.
|
|
7
|
+
version = "3.3.1"
|
|
8
8
|
description = "A Python API for accsyn programmable fast and secure data delivery software"
|
|
9
9
|
authors = ["Henrik Norin <support@accsyn.com>"]
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -395,6 +395,7 @@ class Session(object):
|
|
|
395
395
|
data: Union[str, Dict[str, Any], List[Dict[str, Any]]],
|
|
396
396
|
entityid: Optional[str] = None,
|
|
397
397
|
allow_duplicates: Optional[bool] = None,
|
|
398
|
+
replace_duplicates: Optional[bool] = None,
|
|
398
399
|
) -> Union[Dict[str, Any], List[Dict[str, Any]]]:
|
|
399
400
|
"""
|
|
400
401
|
Create a new accsyn entity.
|
|
@@ -402,7 +403,8 @@ class Session(object):
|
|
|
402
403
|
:param entitytype: The type of entity to create (job, share, acl)
|
|
403
404
|
:param data: The entity data as a dictionary.
|
|
404
405
|
:param entityid: For creating sub entities (tasks), this is the parent (job) id.
|
|
405
|
-
:param allow_duplicates: (jobs and tasks) Allow
|
|
406
|
+
:param allow_duplicates: (jobs and tasks) Allow duplicate tasks (same uri), will ignore the provided task and retry the existing task instead.
|
|
407
|
+
:param replace_duplicates: (jobs and tasks) Do not retry the existing task, replace duplicate tasks (same uri) with the new one instead.
|
|
406
408
|
:return: The created entity data, as dictionary.
|
|
407
409
|
"""
|
|
408
410
|
entitytype = (entitytype or "").lower().strip()
|
|
@@ -429,7 +431,7 @@ class Session(object):
|
|
|
429
431
|
data = dict(tasks=data)
|
|
430
432
|
if entitytype == "file":
|
|
431
433
|
uri = "add"
|
|
432
|
-
if
|
|
434
|
+
if entitytype in [
|
|
433
435
|
"transfer",
|
|
434
436
|
"compute",
|
|
435
437
|
"delivery",
|
|
@@ -438,7 +440,10 @@ class Session(object):
|
|
|
438
440
|
"job",
|
|
439
441
|
"task",
|
|
440
442
|
]:
|
|
441
|
-
|
|
443
|
+
if allow_duplicates is not None:
|
|
444
|
+
data["allow_duplicates"] = allow_duplicates
|
|
445
|
+
if replace_duplicates is not None:
|
|
446
|
+
data["replace_duplicates"] = replace_duplicates
|
|
442
447
|
d = self._event(
|
|
443
448
|
"POST",
|
|
444
449
|
f"{entitytype}/{uri}",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|