fairchild 0.0.6__tar.gz → 0.0.8__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.
- {fairchild-0.0.6 → fairchild-0.0.8}/PKG-INFO +2 -2
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/fairchild.py +6 -6
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/job.py +3 -3
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/PKG-INFO +2 -2
- {fairchild-0.0.6 → fairchild-0.0.8}/pyproject.toml +2 -2
- {fairchild-0.0.6 → fairchild-0.0.8}/LICENSE +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/README.md +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/__init__.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/cli.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/context.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/__init__.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/001_initial.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/002_add_parent_id.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/003_remove_workflows.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/004_add_workers.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/005_add_worker_tasks.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/006_rename_recorded_to_result.sql +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/future.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/task.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/templates/dashboard.html +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/templates/job.html +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/ui.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild/worker.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/SOURCES.txt +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/dependency_links.txt +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/entry_points.txt +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/requires.txt +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/fairchild.egg-info/top_level.txt +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/setup.cfg +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/tests/test_cli.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/tests/test_integration.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/tests/test_job.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/tests/test_task.py +0 -0
- {fairchild-0.0.6 → fairchild-0.0.8}/tests/test_web_ui.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairchild
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Workflow scheduling with PostgreSQL
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: asyncpg>=0.29.0
|
|
@@ -146,12 +146,12 @@ class Fairchild:
|
|
|
146
146
|
|
|
147
147
|
return Job.from_row(dict(row))
|
|
148
148
|
|
|
149
|
-
async def
|
|
150
|
-
"""Get the
|
|
149
|
+
async def get_result(self, job_id: UUID) -> Any:
|
|
150
|
+
"""Get the result value from a completed job."""
|
|
151
151
|
await self._ensure_connected()
|
|
152
152
|
|
|
153
153
|
query = """
|
|
154
|
-
SELECT
|
|
154
|
+
SELECT result FROM fairchild_jobs
|
|
155
155
|
WHERE id = $1
|
|
156
156
|
"""
|
|
157
157
|
|
|
@@ -159,8 +159,8 @@ class Fairchild:
|
|
|
159
159
|
if row is None:
|
|
160
160
|
return None
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
if
|
|
162
|
+
result = row["result"]
|
|
163
|
+
if result is None:
|
|
164
164
|
return None
|
|
165
165
|
|
|
166
|
-
return json.loads(
|
|
166
|
+
return json.loads(result) if isinstance(result, str) else result
|
|
@@ -57,7 +57,7 @@ class Job:
|
|
|
57
57
|
max_attempts: int = 3
|
|
58
58
|
|
|
59
59
|
# Results & errors
|
|
60
|
-
|
|
60
|
+
result: Any | None = None
|
|
61
61
|
errors: list[dict[str, Any]] = field(default_factory=list)
|
|
62
62
|
|
|
63
63
|
# Metadata
|
|
@@ -90,7 +90,7 @@ class Job:
|
|
|
90
90
|
completed_at=row["completed_at"],
|
|
91
91
|
attempt=row["attempt"],
|
|
92
92
|
max_attempts=row["max_attempts"],
|
|
93
|
-
|
|
93
|
+
result=_parse_json(row["result"]),
|
|
94
94
|
errors=_parse_json(row["errors"]) or [],
|
|
95
95
|
tags=row.get("tags") or [],
|
|
96
96
|
meta=_parse_json(row.get("meta")) or {},
|
|
@@ -114,7 +114,7 @@ class Job:
|
|
|
114
114
|
"completed_at": self.completed_at,
|
|
115
115
|
"attempt": self.attempt,
|
|
116
116
|
"max_attempts": self.max_attempts,
|
|
117
|
-
"
|
|
117
|
+
"result": self.result,
|
|
118
118
|
"errors": self.errors,
|
|
119
119
|
"tags": self.tags,
|
|
120
120
|
"meta": self.meta,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairchild
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Workflow scheduling with PostgreSQL
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: asyncpg>=0.29.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fairchild"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.8"
|
|
4
4
|
description = "Workflow scheduling with PostgreSQL"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"asyncpg>=0.29.0",
|
|
9
9
|
"click>=8.0.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
|
{fairchild-0.0.6 → fairchild-0.0.8}/fairchild/db/migrations/006_rename_recorded_to_result.sql
RENAMED
|
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
|