python3-cyberfusion-queue-support 2.3__tar.gz → 2.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-2.3 → python3_cyberfusion_queue_support-2.4}/PKG-INFO +1 -1
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/pyproject.toml +1 -1
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/__init__.py +17 -11
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/database.py +1 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/exceptions/__init__.py +2 -8
- python3_cyberfusion_queue_support-2.4/src/cyberfusion/QueueSupport/migrations/versions/8023b9eecdd1_add_traceback_to_queue_items.py +25 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/PKG-INFO +1 -1
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/SOURCES.txt +1 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/README.md +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/setup.cfg +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/encoders.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/interfaces.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/__init__.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/chmod.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/chown.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/command.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/copy.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_create.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_drop.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_user_drop.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_user_ensure_state.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_user_grant_grant.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/database_user_grant_revoke.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/mkdir.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/move.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/rmtree.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_daemon_reload.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_tmp_files_create.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_disable.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_enable.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_reload.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_restart.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_start.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/systemd_unit_stop.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/items/unlink.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/migrations/__init__.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/migrations/env.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/migrations/versions/571e55ab5ed5_initial_migration.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/migrations/versions/9ae29b5db790_add_string_to_queue_item_outcomes.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/migrations/versions/__init__.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/outcomes.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/settings.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/cyberfusion/QueueSupport/utilities.py +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/dependency_links.txt +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/entry_points.txt +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/requires.txt +0 -0
- {python3_cyberfusion_queue_support-2.3 → python3_cyberfusion_queue_support-2.4}/src/python3_cyberfusion_queue_support.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-queue-support
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.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
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
from copy import copy
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from typing import List
|
|
7
|
-
|
|
7
|
+
import traceback
|
|
8
8
|
from cyberfusion.QueueSupport.database import (
|
|
9
9
|
Queue as QueueModel,
|
|
10
10
|
QueueItem,
|
|
@@ -12,7 +12,7 @@ from cyberfusion.QueueSupport.database import (
|
|
|
12
12
|
QueueItemOutcome,
|
|
13
13
|
QueueProcess,
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
from cyberfusion.QueueSupport.interfaces import OutcomeInterface
|
|
17
17
|
from cyberfusion.QueueSupport.items import _Item
|
|
18
18
|
|
|
@@ -78,6 +78,7 @@ class Queue:
|
|
|
78
78
|
hide_outcomes=item.hide_outcomes,
|
|
79
79
|
deduplicated=deduplicated,
|
|
80
80
|
attributes=item_dict,
|
|
81
|
+
traceback=None,
|
|
81
82
|
)
|
|
82
83
|
|
|
83
84
|
self._database_session.add(object_)
|
|
@@ -105,7 +106,7 @@ class Queue:
|
|
|
105
106
|
if not item_mapping.database_object.deduplicated
|
|
106
107
|
]:
|
|
107
108
|
logger.debug(
|
|
108
|
-
"Processing item with
|
|
109
|
+
"Processing item with ID '%s'", item_mapping.database_object.id
|
|
109
110
|
)
|
|
110
111
|
|
|
111
112
|
item_outcomes = []
|
|
@@ -116,7 +117,7 @@ class Queue:
|
|
|
116
117
|
else:
|
|
117
118
|
try:
|
|
118
119
|
logger.debug(
|
|
119
|
-
"Fulfilling item with
|
|
120
|
+
"Fulfilling item with ID '%s'", item_mapping.database_object.id
|
|
120
121
|
)
|
|
121
122
|
|
|
122
123
|
if item_mapping.item.hide_outcomes:
|
|
@@ -125,14 +126,19 @@ class Queue:
|
|
|
125
126
|
item_outcomes.extend(item_mapping.item.fulfill())
|
|
126
127
|
|
|
127
128
|
logger.debug(
|
|
128
|
-
"Fulfilled item with
|
|
129
|
+
"Fulfilled item with ID '%s'", item_mapping.database_object.id
|
|
129
130
|
)
|
|
130
|
-
except QueueFulfillFailed:
|
|
131
|
-
raise
|
|
132
131
|
except Exception as e:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
logger.exception(e)
|
|
133
|
+
|
|
134
|
+
item_mapping.database_object.traceback = traceback.format_exc()
|
|
135
|
+
|
|
136
|
+
self._database_session.add(item_mapping.database_object)
|
|
137
|
+
self._database_session.commit()
|
|
138
|
+
|
|
139
|
+
# Don't fulfill other queue items
|
|
140
|
+
|
|
141
|
+
break
|
|
136
142
|
|
|
137
143
|
outcomes.extend(item_outcomes)
|
|
138
144
|
|
|
@@ -149,7 +155,7 @@ class Queue:
|
|
|
149
155
|
|
|
150
156
|
self._database_session.commit()
|
|
151
157
|
|
|
152
|
-
logger.debug("Processed item with
|
|
158
|
+
logger.debug("Processed item with ID '%s'", item_mapping.database_object.id)
|
|
153
159
|
|
|
154
160
|
logger.debug("Processed items")
|
|
155
161
|
|
|
@@ -106,6 +106,7 @@ class QueueItem(BaseModel):
|
|
|
106
106
|
hide_outcomes = Column(Boolean, nullable=False)
|
|
107
107
|
deduplicated = Column(Boolean, nullable=False)
|
|
108
108
|
attributes = Column(JSON, nullable=False)
|
|
109
|
+
traceback = Column(String(), nullable=True)
|
|
109
110
|
|
|
110
111
|
|
|
111
112
|
class QueueItemOutcome(BaseModel):
|
|
@@ -20,16 +20,10 @@ class PathIsSymlinkError(ItemError):
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
@dataclass
|
|
23
|
-
class
|
|
24
|
-
"""Error occurred while fulfilling queue."""
|
|
25
|
-
|
|
26
|
-
item: _Item
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@dataclass
|
|
30
|
-
class CommandQueueFulfillFailed(QueueFulfillFailed):
|
|
23
|
+
class CommandQueueFulfillFailed(Exception):
|
|
31
24
|
"""Error occurred while fulfilling queue, with command item."""
|
|
32
25
|
|
|
26
|
+
item: _Item
|
|
33
27
|
command: List[str]
|
|
34
28
|
stdout: str
|
|
35
29
|
stderr: str
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Add traceback to queue_items
|
|
2
|
+
|
|
3
|
+
Revision ID: 8023b9eecdd1
|
|
4
|
+
Revises: 9ae29b5db790
|
|
5
|
+
Create Date: 2025-06-07 12:32:49.485214
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from alembic import op
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# revision identifiers, used by Alembic.
|
|
14
|
+
revision = "8023b9eecdd1"
|
|
15
|
+
down_revision = "9ae29b5db790"
|
|
16
|
+
branch_labels = None
|
|
17
|
+
depends_on = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def upgrade() -> None:
|
|
21
|
+
op.add_column("queue_items", sa.Column("traceback", sa.String(), nullable=True))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def downgrade() -> None:
|
|
25
|
+
op.drop_column("queue_items", "traceback")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-queue-support
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.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
|
|
@@ -35,6 +35,7 @@ src/cyberfusion/QueueSupport/items/unlink.py
|
|
|
35
35
|
src/cyberfusion/QueueSupport/migrations/__init__.py
|
|
36
36
|
src/cyberfusion/QueueSupport/migrations/env.py
|
|
37
37
|
src/cyberfusion/QueueSupport/migrations/versions/571e55ab5ed5_initial_migration.py
|
|
38
|
+
src/cyberfusion/QueueSupport/migrations/versions/8023b9eecdd1_add_traceback_to_queue_items.py
|
|
38
39
|
src/cyberfusion/QueueSupport/migrations/versions/9ae29b5db790_add_string_to_queue_item_outcomes.py
|
|
39
40
|
src/cyberfusion/QueueSupport/migrations/versions/__init__.py
|
|
40
41
|
src/python3_cyberfusion_queue_support.egg-info/PKG-INFO
|
|
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
|
|
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
|