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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accsyn-python-api
3
- Version: 3.3.0
3
+ Version: 3.3.1
4
4
  Summary: A Python API for accsyn programmable fast and secure data delivery software
5
5
  Home-page: https://accsyn.com
6
6
  License: Apache-2.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.0"
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"
@@ -1,4 +1,4 @@
1
1
  # :coding: utf-8
2
2
  # :copyright: Copyright (c) 2015-2023 accsyn/HDR AB
3
3
 
4
- __version__ = "3.3.0-0"
4
+ __version__ = "3.3.1-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 duplicates to be created.
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 allow_duplicates is not None and entitytype in [
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
- data["allow_duplicates"] = allow_duplicates
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}",