horsies 0.1.0a1__tar.gz → 0.1.0a2__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.
Files changed (49) hide show
  1. {horsies-0.1.0a1 → horsies-0.1.0a2}/PKG-INFO +6 -2
  2. horsies-0.1.0a2/README.md +9 -0
  3. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/codec/serde.py +21 -0
  4. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/PKG-INFO +6 -2
  5. {horsies-0.1.0a1 → horsies-0.1.0a2}/pyproject.toml +1 -1
  6. horsies-0.1.0a1/README.md +0 -5
  7. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/__init__.py +0 -0
  8. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/__init__.py +0 -0
  9. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/app.py +0 -0
  10. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/banner.py +0 -0
  11. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/brokers/__init__.py +0 -0
  12. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/brokers/listener.py +0 -0
  13. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/brokers/postgres.py +0 -0
  14. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/cli.py +0 -0
  15. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/errors.py +0 -0
  16. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/logging.py +0 -0
  17. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/__init__.py +0 -0
  18. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/app.py +0 -0
  19. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/broker.py +0 -0
  20. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/queues.py +0 -0
  21. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/recovery.py +0 -0
  22. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/schedule.py +0 -0
  23. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/task_pg.py +0 -0
  24. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/tasks.py +0 -0
  25. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/workflow.py +0 -0
  26. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/models/workflow_pg.py +0 -0
  27. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/registry/tasks.py +0 -0
  28. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/scheduler/__init__.py +0 -0
  29. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/scheduler/calculator.py +0 -0
  30. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/scheduler/service.py +0 -0
  31. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/scheduler/state.py +0 -0
  32. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/task_decorator.py +0 -0
  33. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/types/status.py +0 -0
  34. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/utils/imports.py +0 -0
  35. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/utils/loop_runner.py +0 -0
  36. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/worker/current.py +0 -0
  37. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/worker/worker.py +0 -0
  38. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/workflows/__init__.py +0 -0
  39. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/workflows/engine.py +0 -0
  40. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/workflows/recovery.py +0 -0
  41. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/core/workflows/registry.py +0 -0
  42. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies/py.typed +0 -0
  43. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/SOURCES.txt +0 -0
  44. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/dependency_links.txt +0 -0
  45. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/entry_points.txt +0 -0
  46. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/requires.txt +0 -0
  47. {horsies-0.1.0a1 → horsies-0.1.0a2}/horsies.egg-info/top_level.txt +0 -0
  48. {horsies-0.1.0a1 → horsies-0.1.0a2}/setup.cfg +0 -0
  49. {horsies-0.1.0a1 → horsies-0.1.0a2}/tests/test_issue_fixes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: horsies
3
- Version: 0.1.0a1
3
+ Version: 0.1.0a2
4
4
  Summary: A Python library for distributed task execution
5
5
  Author: Suleyman Ozkeskin
6
6
  License-Expression: MIT
@@ -28,4 +28,8 @@ Requires-Dist: sqlalchemy>=2.0.46
28
28
 
29
29
  A PostgreSQL-backed distributed task queue and workflow engine for Python.
30
30
 
31
- Documentation: [horsies docs](https://github.com/suleymanozkeskin/horsies/tree/main/website)
31
+ Documentation: [horsies docs](https://suleymanozkeskin.github.io/horsies/)
32
+
33
+ ## Syce
34
+
35
+ Monitoring TUI for horsies. Documentation: [syce overview](https://suleymanozkeskin.github.io/horsies/monitoring/syce-overview/)
@@ -0,0 +1,9 @@
1
+ # Horsies
2
+
3
+ A PostgreSQL-backed distributed task queue and workflow engine for Python.
4
+
5
+ Documentation: [horsies docs](https://suleymanozkeskin.github.io/horsies/)
6
+
7
+ ## Syce
8
+
9
+ Monitoring TUI for horsies. Documentation: [syce overview](https://suleymanozkeskin.github.io/horsies/monitoring/syce-overview/)
@@ -12,6 +12,7 @@ from typing import (
12
12
  TypeGuard,
13
13
  cast,
14
14
  )
15
+ import datetime as dt
15
16
  import json
16
17
  import traceback as tb
17
18
  from pydantic import BaseModel
@@ -187,6 +188,16 @@ def to_jsonable(value: Any) -> Json:
187
188
  if _is_json_native(value):
188
189
  return value
189
190
 
191
+ # datetime.datetime is a subclass of datetime.date — check datetime first.
192
+ if isinstance(value, dt.datetime):
193
+ return {'__datetime__': True, 'value': value.isoformat()}
194
+
195
+ if isinstance(value, dt.date):
196
+ return {'__date__': True, 'value': value.isoformat()}
197
+
198
+ if isinstance(value, dt.time):
199
+ return {'__time__': True, 'value': value.isoformat()}
200
+
190
201
  # Is value a `TaskResult`?
191
202
  if _is_task_result(value):
192
203
  # Represent discriminated union explicitly
@@ -447,6 +458,16 @@ def rehydrate_value(value: Json) -> Any:
447
458
  f'Failed to rehydrate dataclass {cache_key}: {str(e)}'
448
459
  )
449
460
 
461
+ # Handle datetime rehydration (datetime before date — subclass ordering)
462
+ if isinstance(value, dict) and value.get('__datetime__'):
463
+ return dt.datetime.fromisoformat(cast(str, value['value']))
464
+
465
+ if isinstance(value, dict) and value.get('__date__'):
466
+ return dt.date.fromisoformat(cast(str, value['value']))
467
+
468
+ if isinstance(value, dict) and value.get('__time__'):
469
+ return dt.time.fromisoformat(cast(str, value['value']))
470
+
450
471
  # Handle nested TaskResult rehydration
451
472
  if isinstance(value, dict) and value.get('__task_result__'):
452
473
  return task_result_from_json(value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: horsies
3
- Version: 0.1.0a1
3
+ Version: 0.1.0a2
4
4
  Summary: A Python library for distributed task execution
5
5
  Author: Suleyman Ozkeskin
6
6
  License-Expression: MIT
@@ -28,4 +28,8 @@ Requires-Dist: sqlalchemy>=2.0.46
28
28
 
29
29
  A PostgreSQL-backed distributed task queue and workflow engine for Python.
30
30
 
31
- Documentation: [horsies docs](https://github.com/suleymanozkeskin/horsies/tree/main/website)
31
+ Documentation: [horsies docs](https://suleymanozkeskin.github.io/horsies/)
32
+
33
+ ## Syce
34
+
35
+ Monitoring TUI for horsies. Documentation: [syce overview](https://suleymanozkeskin.github.io/horsies/monitoring/syce-overview/)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "horsies"
7
- version = "0.1.0a1"
7
+ version = "0.1.0a2"
8
8
  description = "A Python library for distributed task execution"
9
9
  readme = "README.md"
10
10
  license = "MIT"
horsies-0.1.0a1/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Horsies
2
-
3
- A PostgreSQL-backed distributed task queue and workflow engine for Python.
4
-
5
- Documentation: [horsies docs](https://github.com/suleymanozkeskin/horsies/tree/main/website)
File without changes
File without changes
File without changes
File without changes
File without changes