python3-cyberfusion-queue-support 2.4__py3-none-any.whl → 2.5__py3-none-any.whl

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.
@@ -45,11 +45,12 @@ class CommandItem(_Item):
45
45
  outcome.command,
46
46
  check=True,
47
47
  text=True,
48
- capture_output=True,
48
+ stdout=subprocess.PIPE,
49
+ stderr=subprocess.PIPE,
49
50
  )
50
51
 
51
- logger.info("Command stdout: %s", output.stdout)
52
- logger.info("Command stderr: %s", output.stderr)
52
+ outcome.stdout = output.stdout
53
+ outcome.stderr = output.stderr
53
54
  except subprocess.CalledProcessError as e:
54
55
  raise CommandQueueFulfillFailed(
55
56
  self, command=outcome.command, stdout=e.stdout, stderr=e.stderr
@@ -9,6 +9,8 @@ from cyberfusion.DatabaseSupport.databases import Database
9
9
  from cyberfusion.QueueSupport.interfaces import OutcomeInterface
10
10
  from cyberfusion.SystemdSupport.units import Unit
11
11
 
12
+ from cyberfusion.QueueSupport.sentinels import UNKNOWN
13
+
12
14
 
13
15
  class CopyItemCopyOutcome(OutcomeInterface):
14
16
  """Represents outcome."""
@@ -147,9 +149,17 @@ class RmTreeItemRemoveOutcome(OutcomeInterface):
147
149
  class CommandItemRunOutcome(OutcomeInterface):
148
150
  """Represents outcome."""
149
151
 
150
- def __init__(self, *, command: List[str]) -> None:
152
+ def __init__(
153
+ self,
154
+ *,
155
+ command: List[str],
156
+ stdout: str | UNKNOWN = UNKNOWN,
157
+ stderr: str | UNKNOWN = UNKNOWN,
158
+ ) -> None:
151
159
  """Set attributes."""
152
160
  self.command = command
161
+ self.stdout = stdout
162
+ self.stderr = stderr
153
163
 
154
164
  def __str__(self) -> str:
155
165
  """Get human-readable string."""
@@ -160,7 +170,11 @@ class CommandItemRunOutcome(OutcomeInterface):
160
170
  if not isinstance(other, CommandItemRunOutcome):
161
171
  return False
162
172
 
163
- return other.command == self.command
173
+ return (
174
+ other.command == self.command
175
+ and other.stdout == self.stdout
176
+ and other.stderr == self.stderr
177
+ )
164
178
 
165
179
 
166
180
  class ChmodItemModeChangeOutcome(OutcomeInterface):
@@ -0,0 +1,3 @@
1
+ from typing import TypeVar
2
+
3
+ UNKNOWN = TypeVar("UNKNOWN")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python3-cyberfusion-queue-support
3
- Version: 2.4
3
+ Version: 2.5
4
4
  Summary: Library to queue actions.
5
5
  Author-email: Cyberfusion <support@cyberfusion.io>
6
6
  Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-queue-support
@@ -2,14 +2,15 @@ cyberfusion/QueueSupport/__init__.py,sha256=JcGNqU0hnN0wan1lY9Ly0yWAprS1Pzw1cT0m
2
2
  cyberfusion/QueueSupport/database.py,sha256=tlsOiX8owV9DM9a4FWO224XICjDSrrd-vaCiPbkQk7E,3610
3
3
  cyberfusion/QueueSupport/encoders.py,sha256=5gxU0OXsX16OChHDCDaWTV-s1Y7KRcZ8aVplAO1WDyM,371
4
4
  cyberfusion/QueueSupport/interfaces.py,sha256=ip8z6cfLFldQCDSec6fK6AIOdxOjIyFykDv4dCHJYSI,943
5
- cyberfusion/QueueSupport/outcomes.py,sha256=kv_0zODEraaZnuLRMcaQgWCfgstpJRDSO5YWYFAgEgw,18564
5
+ cyberfusion/QueueSupport/outcomes.py,sha256=MjvhjfEu2rACvgZfAsjtmVPOUonuhyVhAuV5HuJDvgI,18903
6
+ cyberfusion/QueueSupport/sentinels.py,sha256=LwD1BUxDJgY6aJr21cunZKRn5nycqqlNlmJhFKjqUBw,57
6
7
  cyberfusion/QueueSupport/settings.py,sha256=SqhkRkrC3BRHbYMVM_S6yUzOFnWmg-KOnEeG9NkQnD0,257
7
8
  cyberfusion/QueueSupport/utilities.py,sha256=vsQOZunX0UwudoIauCPV-Ij1TVrjWG_16wctvJPaMVQ,186
8
9
  cyberfusion/QueueSupport/exceptions/__init__.py,sha256=2YAEQg8bsAMHq184ZCggNogaY3gsUv7Zym1EXAPSG-I,657
9
10
  cyberfusion/QueueSupport/items/__init__.py,sha256=MLWovIj1hqjZ5kSjR_AfQ0Ev70sRI2w6cUGryvnfnJk,842
10
11
  cyberfusion/QueueSupport/items/chmod.py,sha256=3w12f38u3lG0qs-tzQoYzf8I6jqfJ2pjnsx4mXt3JhA,2041
11
12
  cyberfusion/QueueSupport/items/chown.py,sha256=LfgkXMAwzE3HBwbqMXPP1rpuHRNIPV4BeBssvPrEgBQ,4054
12
- cyberfusion/QueueSupport/items/command.py,sha256=O6seqqEE2XSHqf9P2B2SAPLGFzWCVbr-lRm5-OamjV0,1846
13
+ cyberfusion/QueueSupport/items/command.py,sha256=TrBWZEYW9tLJzypDdJH0je8U_P0Pgc0nSVWMWvUCm-k,1857
13
14
  cyberfusion/QueueSupport/items/copy.py,sha256=08vPCIsgrkOH4Ryir8m8CpjT9Y4GL5vPmgWuVosK4q4,3007
14
15
  cyberfusion/QueueSupport/items/database_create.py,sha256=01Z3ULjhzQFjL4PSfvKNZ9pMkjiZb3RIr6WCirbaK6c,1832
15
16
  cyberfusion/QueueSupport/items/database_drop.py,sha256=cnmEL8gZ6ORBL-ylghQAQSq1FOZCtM6O8uwPcnqBI4c,1806
@@ -35,8 +36,8 @@ cyberfusion/QueueSupport/migrations/versions/571e55ab5ed5_initial_migration.py,s
35
36
  cyberfusion/QueueSupport/migrations/versions/8023b9eecdd1_add_traceback_to_queue_items.py,sha256=IfwqqHeE6e4iDH3bc6FrOgdBT4w-Kxa2MYv0dzYjEbk,497
36
37
  cyberfusion/QueueSupport/migrations/versions/9ae29b5db790_add_string_to_queue_item_outcomes.py,sha256=CzNJVL5Ia_J5woGsnCRSrlraoaT8YfgZUVOlAWHjb2Y,546
37
38
  cyberfusion/QueueSupport/migrations/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- python3_cyberfusion_queue_support-2.4.dist-info/METADATA,sha256=sfFzrCIiZ4ka7b67b_51ovqc3wJG6Y64WDVlK1Yr2yI,4488
39
- python3_cyberfusion_queue_support-2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- python3_cyberfusion_queue_support-2.4.dist-info/entry_points.txt,sha256=j42nbFWu1jTev4Ca3GhEZlH546t48aqYXnaKP20NWfA,91
41
- python3_cyberfusion_queue_support-2.4.dist-info/top_level.txt,sha256=ss011q9S6SL_KIIyq7iujFmIYa0grSjlnInO7cDkeag,12
42
- python3_cyberfusion_queue_support-2.4.dist-info/RECORD,,
39
+ python3_cyberfusion_queue_support-2.5.dist-info/METADATA,sha256=lrGDtqyguoP479V_BcVmVmRuUWW7s5c-YI-GdTgYO5c,4488
40
+ python3_cyberfusion_queue_support-2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ python3_cyberfusion_queue_support-2.5.dist-info/entry_points.txt,sha256=j42nbFWu1jTev4Ca3GhEZlH546t48aqYXnaKP20NWfA,91
42
+ python3_cyberfusion_queue_support-2.5.dist-info/top_level.txt,sha256=ss011q9S6SL_KIIyq7iujFmIYa0grSjlnInO7cDkeag,12
43
+ python3_cyberfusion_queue_support-2.5.dist-info/RECORD,,