python3-cyberfusion-queue-support 1.3__tar.gz → 1.4__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.
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/PKG-INFO +2 -2
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/pyproject.toml +2 -2
- python3_cyberfusion_queue_support-1.4/src/cyberfusion/QueueSupport/items/systemd_unit_start.py +52 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/outcomes.py +19 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/python3_cyberfusion_queue_support.egg-info/PKG-INFO +2 -2
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/python3_cyberfusion_queue_support.egg-info/SOURCES.txt +1 -0
- python3_cyberfusion_queue_support-1.4/src/python3_cyberfusion_queue_support.egg-info/requires.txt +1 -0
- python3_cyberfusion_queue_support-1.3/src/python3_cyberfusion_queue_support.egg-info/requires.txt +0 -1
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/README.md +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/setup.cfg +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/__init__.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/exceptions/__init__.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/interfaces.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/__init__.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/chmod.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/chown.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/command.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/copy.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/mkdir.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/move.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/rmtree.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_tmp_files_create.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_unit_disable.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_unit_enable.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_unit_reload.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_unit_restart.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/systemd_unit_stop.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/items/unlink.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/cyberfusion/QueueSupport/utilities.py +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/python3_cyberfusion_queue_support.egg-info/dependency_links.txt +0 -0
- {python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/src/python3_cyberfusion_queue_support.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python3-cyberfusion-queue-support
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4
|
|
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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: python3-cyberfusion-systemd-support~=2.
|
|
8
|
+
Requires-Dist: python3-cyberfusion-systemd-support~=2.1
|
|
9
9
|
|
|
10
10
|
# python3-cyberfusion-queue-support
|
|
11
11
|
|
{python3_cyberfusion_queue_support-1.3 → python3_cyberfusion_queue_support-1.4}/pyproject.toml
RENAMED
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python3-cyberfusion-queue-support"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.4"
|
|
8
8
|
description = "Library to queue actions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
11
11
|
{ name = "Cyberfusion", email = "support@cyberfusion.io" },
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"python3-cyberfusion-systemd-support~=2.
|
|
14
|
+
"python3-cyberfusion-systemd-support~=2.1",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[project.urls]
|
python3_cyberfusion_queue_support-1.4/src/cyberfusion/QueueSupport/items/systemd_unit_start.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Item."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
from typing import List, Optional
|
|
5
|
+
|
|
6
|
+
from cyberfusion.QueueSupport.items import _Item
|
|
7
|
+
from cyberfusion.QueueSupport.outcomes import (
|
|
8
|
+
SystemdUnitStartItemStartOutcome,
|
|
9
|
+
)
|
|
10
|
+
from cyberfusion.SystemdSupport.units import Unit
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SystemdUnitStartItem(_Item):
|
|
16
|
+
"""Represents item."""
|
|
17
|
+
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
*,
|
|
21
|
+
name: str,
|
|
22
|
+
reference: Optional[str] = None,
|
|
23
|
+
hide_outcomes: bool = False,
|
|
24
|
+
) -> None:
|
|
25
|
+
"""Set attributes."""
|
|
26
|
+
self.name = name
|
|
27
|
+
self._reference = reference
|
|
28
|
+
self._hide_outcomes = hide_outcomes
|
|
29
|
+
|
|
30
|
+
self.unit = Unit(self.name)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def outcomes(self) -> List[SystemdUnitStartItemStartOutcome]:
|
|
34
|
+
"""Get outcomes of item."""
|
|
35
|
+
outcomes = []
|
|
36
|
+
|
|
37
|
+
if not self.unit.is_active:
|
|
38
|
+
outcomes.append(SystemdUnitStartItemStartOutcome(unit=self.unit))
|
|
39
|
+
|
|
40
|
+
return outcomes
|
|
41
|
+
|
|
42
|
+
def fulfill(self) -> None:
|
|
43
|
+
"""Fulfill outcomes."""
|
|
44
|
+
for outcome in self.outcomes:
|
|
45
|
+
outcome.unit.start()
|
|
46
|
+
|
|
47
|
+
def __eq__(self, other: object) -> bool:
|
|
48
|
+
"""Get equality based on attributes."""
|
|
49
|
+
if not isinstance(other, SystemdUnitStartItem):
|
|
50
|
+
return False
|
|
51
|
+
|
|
52
|
+
return other.name == self.name
|
|
@@ -248,6 +248,25 @@ class SystemdUnitEnableItemEnableOutcome(OutcomeInterface):
|
|
|
248
248
|
return other.unit.name == self.unit.name
|
|
249
249
|
|
|
250
250
|
|
|
251
|
+
class SystemdUnitStartItemStartOutcome(OutcomeInterface):
|
|
252
|
+
"""Represents outcome."""
|
|
253
|
+
|
|
254
|
+
def __init__(self, *, unit: Unit) -> None:
|
|
255
|
+
"""Set attributes."""
|
|
256
|
+
self.unit = unit
|
|
257
|
+
|
|
258
|
+
def __str__(self) -> str:
|
|
259
|
+
"""Get human-readable string."""
|
|
260
|
+
return f"Start {self.unit.name}"
|
|
261
|
+
|
|
262
|
+
def __eq__(self, other: object) -> bool:
|
|
263
|
+
"""Get equality based on attributes."""
|
|
264
|
+
if not isinstance(other, SystemdUnitStartItemStartOutcome):
|
|
265
|
+
return False
|
|
266
|
+
|
|
267
|
+
return other.unit.name == self.unit.name
|
|
268
|
+
|
|
269
|
+
|
|
251
270
|
class SystemdUnitDisableItemDisableOutcome(OutcomeInterface):
|
|
252
271
|
"""Represents outcome."""
|
|
253
272
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python3-cyberfusion-queue-support
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4
|
|
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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: python3-cyberfusion-systemd-support~=2.
|
|
8
|
+
Requires-Dist: python3-cyberfusion-systemd-support~=2.1
|
|
9
9
|
|
|
10
10
|
# python3-cyberfusion-queue-support
|
|
11
11
|
|
|
@@ -19,6 +19,7 @@ src/cyberfusion/QueueSupport/items/systemd_unit_disable.py
|
|
|
19
19
|
src/cyberfusion/QueueSupport/items/systemd_unit_enable.py
|
|
20
20
|
src/cyberfusion/QueueSupport/items/systemd_unit_reload.py
|
|
21
21
|
src/cyberfusion/QueueSupport/items/systemd_unit_restart.py
|
|
22
|
+
src/cyberfusion/QueueSupport/items/systemd_unit_start.py
|
|
22
23
|
src/cyberfusion/QueueSupport/items/systemd_unit_stop.py
|
|
23
24
|
src/cyberfusion/QueueSupport/items/unlink.py
|
|
24
25
|
src/python3_cyberfusion_queue_support.egg-info/PKG-INFO
|
python3_cyberfusion_queue_support-1.4/src/python3_cyberfusion_queue_support.egg-info/requires.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python3-cyberfusion-systemd-support~=2.1
|
python3_cyberfusion_queue_support-1.3/src/python3_cyberfusion_queue_support.egg-info/requires.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
python3-cyberfusion-systemd-support~=2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|