quebec 0.2.1__tar.gz → 0.2.3__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 (86) hide show
  1. {quebec-0.2.1 → quebec-0.2.3}/.gitignore +0 -1
  2. {quebec-0.2.1 → quebec-0.2.3}/Cargo.lock +100 -52
  3. {quebec-0.2.1 → quebec-0.2.3}/Cargo.toml +2 -1
  4. {quebec-0.2.1 → quebec-0.2.3}/PKG-INFO +4 -4
  5. {quebec-0.2.1 → quebec-0.2.3}/pyproject.toml +1 -1
  6. {quebec-0.2.1 → quebec-0.2.3}/python/quebec/__init__.py +38 -31
  7. quebec-0.2.3/python/quebec/logger.py +238 -0
  8. quebec-0.2.3/python/quebec/sqlalchemy.py +408 -0
  9. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/recurring_jobs.rs +12 -10
  10. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/mod.rs +3 -4
  11. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/utils.rs +1 -0
  12. {quebec-0.2.1 → quebec-0.2.3}/src/lib.rs +63 -23
  13. {quebec-0.2.1 → quebec-0.2.3}/src/query_builder.rs +226 -13
  14. {quebec-0.2.1 → quebec-0.2.3}/src/scheduler.rs +40 -15
  15. {quebec-0.2.1 → quebec-0.2.3}/src/schema_builder.rs +39 -4
  16. {quebec-0.2.1 → quebec-0.2.3}/src/worker.rs +366 -10
  17. quebec-0.2.1/python/quebec/logger.py +0 -47
  18. {quebec-0.2.1 → quebec-0.2.3}/.github/workflows/ci.yml +0 -0
  19. {quebec-0.2.1 → quebec-0.2.3}/.github/workflows/test.yml +0 -0
  20. {quebec-0.2.1 → quebec-0.2.3}/LICENSE +0 -0
  21. {quebec-0.2.1 → quebec-0.2.3}/README.md +0 -0
  22. {quebec-0.2.1 → quebec-0.2.3}/docs/images/control-plane.png +0 -0
  23. {quebec-0.2.1 → quebec-0.2.3}/public/blocked-jobs.html +0 -0
  24. {quebec-0.2.1 → quebec-0.2.3}/public/failed-jobs.html +0 -0
  25. {quebec-0.2.1 → quebec-0.2.3}/public/finished-jobs.html +0 -0
  26. {quebec-0.2.1 → quebec-0.2.3}/public/in-progress-jobs.html +0 -0
  27. {quebec-0.2.1 → quebec-0.2.3}/public/index.html +0 -0
  28. {quebec-0.2.1 → quebec-0.2.3}/public/job-details.html +0 -0
  29. {quebec-0.2.1 → quebec-0.2.3}/public/queue-details.html +0 -0
  30. {quebec-0.2.1 → quebec-0.2.3}/public/queues.html +0 -0
  31. {quebec-0.2.1 → quebec-0.2.3}/public/scheduled-jobs.html +0 -0
  32. {quebec-0.2.1 → quebec-0.2.3}/public/workers.html +0 -0
  33. {quebec-0.2.1 → quebec-0.2.3}/quickstart.py +0 -0
  34. {quebec-0.2.1 → quebec-0.2.3}/src/config.rs +0 -0
  35. {quebec-0.2.1 → quebec-0.2.3}/src/context.rs +0 -0
  36. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/ext.rs +0 -0
  37. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/blocked_jobs.rs +0 -0
  38. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/failed_jobs.rs +0 -0
  39. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/finished_jobs.rs +0 -0
  40. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/in_progress_jobs.rs +0 -0
  41. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/job_details.rs +0 -0
  42. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/mod.rs +0 -0
  43. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/overview.rs +0 -0
  44. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/queues.rs +0 -0
  45. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/scheduled_jobs.rs +0 -0
  46. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/handlers/workers.rs +0 -0
  47. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/models.rs +0 -0
  48. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/base.html +0 -0
  49. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/blocked-jobs.html +0 -0
  50. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/failed-jobs.html +0 -0
  51. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/finished-jobs.html +0 -0
  52. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/in-progress-jobs.html +0 -0
  53. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/job-details.html +0 -0
  54. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/overview.html +0 -0
  55. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/queue-details.html +0 -0
  56. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/queues.html +0 -0
  57. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/recurring-jobs-schedule.html +0 -0
  58. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/recurring-jobs.html +0 -0
  59. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/scheduled-jobs.html +0 -0
  60. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/stats.html +0 -0
  61. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates/workers.html +0 -0
  62. {quebec-0.2.1 → quebec-0.2.3}/src/control_plane/templates.rs +0 -0
  63. {quebec-0.2.1 → quebec-0.2.3}/src/core.rs +0 -0
  64. {quebec-0.2.1 → quebec-0.2.3}/src/dispatcher.rs +0 -0
  65. {quebec-0.2.1 → quebec-0.2.3}/src/entities/mod.rs +0 -0
  66. {quebec-0.2.1 → quebec-0.2.3}/src/entities/prelude.rs +0 -0
  67. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_blocked_executions.rs +0 -0
  68. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_claimed_executions.rs +0 -0
  69. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_failed_executions.rs +0 -0
  70. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_jobs.rs +0 -0
  71. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_pauses.rs +0 -0
  72. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_processes.rs +0 -0
  73. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_ready_executions.rs +0 -0
  74. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_recurring_executions.rs +0 -0
  75. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_recurring_tasks.rs +0 -0
  76. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_scheduled_executions.rs +0 -0
  77. {quebec-0.2.1 → quebec-0.2.3}/src/entities/quebec_semaphores.rs +0 -0
  78. {quebec-0.2.1 → quebec-0.2.3}/src/error.rs +0 -0
  79. {quebec-0.2.1 → quebec-0.2.3}/src/notify.rs +0 -0
  80. {quebec-0.2.1 → quebec-0.2.3}/src/process.rs +0 -0
  81. {quebec-0.2.1 → quebec-0.2.3}/src/proctitle_macos.rs +0 -0
  82. {quebec-0.2.1 → quebec-0.2.3}/src/proctitle_unix.rs +0 -0
  83. {quebec-0.2.1 → quebec-0.2.3}/src/semaphore.rs +0 -0
  84. {quebec-0.2.1 → quebec-0.2.3}/src/supervisor.rs +0 -0
  85. {quebec-0.2.1 → quebec-0.2.3}/src/types.rs +0 -0
  86. {quebec-0.2.1 → quebec-0.2.3}/src/utils.rs +0 -0
@@ -1,6 +1,5 @@
1
1
  # Rust
2
2
  /target/
3
- Cargo.lock
4
3
  **/*.rs.bk
5
4
  *.pdb
6
5
 
@@ -124,7 +124,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
124
124
  dependencies = [
125
125
  "proc-macro2",
126
126
  "quote",
127
- "syn 2.0.111",
127
+ "syn 2.0.112",
128
128
  ]
129
129
 
130
130
  [[package]]
@@ -135,7 +135,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
135
135
  dependencies = [
136
136
  "proc-macro2",
137
137
  "quote",
138
- "syn 2.0.111",
138
+ "syn 2.0.112",
139
139
  ]
140
140
 
141
141
  [[package]]
@@ -310,7 +310,7 @@ dependencies = [
310
310
  "proc-macro-crate",
311
311
  "proc-macro2",
312
312
  "quote",
313
- "syn 2.0.111",
313
+ "syn 2.0.112",
314
314
  ]
315
315
 
316
316
  [[package]]
@@ -468,7 +468,7 @@ dependencies = [
468
468
  "heck 0.5.0",
469
469
  "proc-macro2",
470
470
  "quote",
471
- "syn 2.0.111",
471
+ "syn 2.0.112",
472
472
  ]
473
473
 
474
474
  [[package]]
@@ -630,7 +630,7 @@ dependencies = [
630
630
  "proc-macro2",
631
631
  "quote",
632
632
  "rustc_version",
633
- "syn 2.0.111",
633
+ "syn 2.0.112",
634
634
  "unicode-xid",
635
635
  ]
636
636
 
@@ -660,7 +660,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
660
660
  dependencies = [
661
661
  "proc-macro2",
662
662
  "quote",
663
- "syn 2.0.111",
663
+ "syn 2.0.112",
664
664
  ]
665
665
 
666
666
  [[package]]
@@ -836,7 +836,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
836
836
  dependencies = [
837
837
  "proc-macro2",
838
838
  "quote",
839
- "syn 2.0.111",
839
+ "syn 2.0.112",
840
840
  ]
841
841
 
842
842
  [[package]]
@@ -911,8 +911,8 @@ dependencies = [
911
911
  "aho-corasick",
912
912
  "bstr",
913
913
  "log",
914
- "regex-automata",
915
- "regex-syntax",
914
+ "regex-automata 0.4.13",
915
+ "regex-syntax 0.8.8",
916
916
  ]
917
917
 
918
918
  [[package]]
@@ -1265,7 +1265,7 @@ dependencies = [
1265
1265
  "globset",
1266
1266
  "log",
1267
1267
  "memchr",
1268
- "regex-automata",
1268
+ "regex-automata 0.4.13",
1269
1269
  "same-file",
1270
1270
  "walkdir",
1271
1271
  "winapi-util",
@@ -1298,7 +1298,7 @@ checksum = "c727f80bfa4a6c6e2508d2f05b6f4bfce242030bd88ed15ae5331c5b5d30fba7"
1298
1298
  dependencies = [
1299
1299
  "proc-macro2",
1300
1300
  "quote",
1301
- "syn 2.0.111",
1301
+ "syn 2.0.112",
1302
1302
  ]
1303
1303
 
1304
1304
  [[package]]
@@ -1389,11 +1389,11 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
1389
1389
 
1390
1390
  [[package]]
1391
1391
  name = "matchers"
1392
- version = "0.2.0"
1392
+ version = "0.1.0"
1393
1393
  source = "registry+https://github.com/rust-lang/crates.io-index"
1394
- checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
1394
+ checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
1395
1395
  dependencies = [
1396
- "regex-automata",
1396
+ "regex-automata 0.1.10",
1397
1397
  ]
1398
1398
 
1399
1399
  [[package]]
@@ -1465,11 +1465,12 @@ dependencies = [
1465
1465
 
1466
1466
  [[package]]
1467
1467
  name = "nu-ansi-term"
1468
- version = "0.50.3"
1468
+ version = "0.46.0"
1469
1469
  source = "registry+https://github.com/rust-lang/crates.io-index"
1470
- checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
1470
+ checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
1471
1471
  dependencies = [
1472
- "windows-sys 0.61.2",
1472
+ "overload",
1473
+ "winapi",
1473
1474
  ]
1474
1475
 
1475
1476
  [[package]]
@@ -1521,7 +1522,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
1521
1522
  dependencies = [
1522
1523
  "proc-macro2",
1523
1524
  "quote",
1524
- "syn 2.0.111",
1525
+ "syn 2.0.112",
1525
1526
  ]
1526
1527
 
1527
1528
  [[package]]
@@ -1596,9 +1597,15 @@ dependencies = [
1596
1597
  "proc-macro2",
1597
1598
  "proc-macro2-diagnostics",
1598
1599
  "quote",
1599
- "syn 2.0.111",
1600
+ "syn 2.0.112",
1600
1601
  ]
1601
1602
 
1603
+ [[package]]
1604
+ name = "overload"
1605
+ version = "0.1.1"
1606
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1607
+ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
1608
+
1602
1609
  [[package]]
1603
1610
  name = "parking"
1604
1611
  version = "2.2.1"
@@ -1682,7 +1689,7 @@ dependencies = [
1682
1689
  "pest_meta",
1683
1690
  "proc-macro2",
1684
1691
  "quote",
1685
- "syn 2.0.111",
1692
+ "syn 2.0.112",
1686
1693
  ]
1687
1694
 
1688
1695
  [[package]]
@@ -1905,7 +1912,7 @@ dependencies = [
1905
1912
  "proc-macro-error-attr2",
1906
1913
  "proc-macro2",
1907
1914
  "quote",
1908
- "syn 2.0.111",
1915
+ "syn 2.0.112",
1909
1916
  ]
1910
1917
 
1911
1918
  [[package]]
@@ -1925,7 +1932,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
1925
1932
  dependencies = [
1926
1933
  "proc-macro2",
1927
1934
  "quote",
1928
- "syn 2.0.111",
1935
+ "syn 2.0.112",
1929
1936
  "version_check",
1930
1937
  "yansi",
1931
1938
  ]
@@ -2013,7 +2020,7 @@ dependencies = [
2013
2020
  "proc-macro2",
2014
2021
  "pyo3-macros-backend",
2015
2022
  "quote",
2016
- "syn 2.0.111",
2023
+ "syn 2.0.112",
2017
2024
  ]
2018
2025
 
2019
2026
  [[package]]
@@ -2026,7 +2033,7 @@ dependencies = [
2026
2033
  "proc-macro2",
2027
2034
  "pyo3-build-config",
2028
2035
  "quote",
2029
- "syn 2.0.111",
2036
+ "syn 2.0.112",
2030
2037
  ]
2031
2038
 
2032
2039
  [[package]]
@@ -2067,6 +2074,7 @@ dependencies = [
2067
2074
  "tower-http",
2068
2075
  "tracing",
2069
2076
  "tracing-log",
2077
+ "tracing-logfmt",
2070
2078
  "tracing-subscriber",
2071
2079
  "url",
2072
2080
  "uuid",
@@ -2178,8 +2186,17 @@ checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
2178
2186
  dependencies = [
2179
2187
  "aho-corasick",
2180
2188
  "memchr",
2181
- "regex-automata",
2182
- "regex-syntax",
2189
+ "regex-automata 0.4.13",
2190
+ "regex-syntax 0.8.8",
2191
+ ]
2192
+
2193
+ [[package]]
2194
+ name = "regex-automata"
2195
+ version = "0.1.10"
2196
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2197
+ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
2198
+ dependencies = [
2199
+ "regex-syntax 0.6.29",
2183
2200
  ]
2184
2201
 
2185
2202
  [[package]]
@@ -2190,9 +2207,15 @@ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
2190
2207
  dependencies = [
2191
2208
  "aho-corasick",
2192
2209
  "memchr",
2193
- "regex-syntax",
2210
+ "regex-syntax 0.8.8",
2194
2211
  ]
2195
2212
 
2213
+ [[package]]
2214
+ name = "regex-syntax"
2215
+ version = "0.6.29"
2216
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2217
+ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
2218
+
2196
2219
  [[package]]
2197
2220
  name = "regex-syntax"
2198
2221
  version = "0.8.8"
@@ -2291,7 +2314,7 @@ dependencies = [
2291
2314
  "proc-macro2",
2292
2315
  "quote",
2293
2316
  "rust-embed-utils",
2294
- "syn 2.0.111",
2317
+ "syn 2.0.112",
2295
2318
  "walkdir",
2296
2319
  ]
2297
2320
 
@@ -2402,7 +2425,7 @@ dependencies = [
2402
2425
  "proc-macro-error2",
2403
2426
  "proc-macro2",
2404
2427
  "quote",
2405
- "syn 2.0.111",
2428
+ "syn 2.0.112",
2406
2429
  ]
2407
2430
 
2408
2431
  [[package]]
@@ -2445,7 +2468,7 @@ dependencies = [
2445
2468
  "proc-macro2",
2446
2469
  "quote",
2447
2470
  "sea-bae",
2448
- "syn 2.0.111",
2471
+ "syn 2.0.112",
2449
2472
  "unicode-ident",
2450
2473
  ]
2451
2474
 
@@ -2520,7 +2543,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
2520
2543
  dependencies = [
2521
2544
  "proc-macro2",
2522
2545
  "quote",
2523
- "syn 2.0.111",
2546
+ "syn 2.0.112",
2524
2547
  ]
2525
2548
 
2526
2549
  [[package]]
@@ -2769,7 +2792,7 @@ dependencies = [
2769
2792
  "quote",
2770
2793
  "sqlx-core",
2771
2794
  "sqlx-macros-core",
2772
- "syn 2.0.111",
2795
+ "syn 2.0.112",
2773
2796
  ]
2774
2797
 
2775
2798
  [[package]]
@@ -2792,7 +2815,7 @@ dependencies = [
2792
2815
  "sqlx-mysql",
2793
2816
  "sqlx-postgres",
2794
2817
  "sqlx-sqlite",
2795
- "syn 2.0.111",
2818
+ "syn 2.0.112",
2796
2819
  "tokio",
2797
2820
  "url",
2798
2821
  ]
@@ -2968,9 +2991,9 @@ dependencies = [
2968
2991
 
2969
2992
  [[package]]
2970
2993
  name = "syn"
2971
- version = "2.0.111"
2994
+ version = "2.0.112"
2972
2995
  source = "registry+https://github.com/rust-lang/crates.io-index"
2973
- checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
2996
+ checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4"
2974
2997
  dependencies = [
2975
2998
  "proc-macro2",
2976
2999
  "quote",
@@ -2991,7 +3014,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
2991
3014
  dependencies = [
2992
3015
  "proc-macro2",
2993
3016
  "quote",
2994
- "syn 2.0.111",
3017
+ "syn 2.0.112",
2995
3018
  ]
2996
3019
 
2997
3020
  [[package]]
@@ -3054,7 +3077,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
3054
3077
  dependencies = [
3055
3078
  "proc-macro2",
3056
3079
  "quote",
3057
- "syn 2.0.111",
3080
+ "syn 2.0.112",
3058
3081
  ]
3059
3082
 
3060
3083
  [[package]]
@@ -3065,7 +3088,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
3065
3088
  dependencies = [
3066
3089
  "proc-macro2",
3067
3090
  "quote",
3068
- "syn 2.0.111",
3091
+ "syn 2.0.112",
3069
3092
  ]
3070
3093
 
3071
3094
  [[package]]
@@ -3175,7 +3198,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
3175
3198
  dependencies = [
3176
3199
  "proc-macro2",
3177
3200
  "quote",
3178
- "syn 2.0.111",
3201
+ "syn 2.0.112",
3179
3202
  ]
3180
3203
 
3181
3204
  [[package]]
@@ -3331,7 +3354,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
3331
3354
  dependencies = [
3332
3355
  "proc-macro2",
3333
3356
  "quote",
3334
- "syn 2.0.111",
3357
+ "syn 2.0.112",
3335
3358
  ]
3336
3359
 
3337
3360
  [[package]]
@@ -3355,22 +3378,47 @@ dependencies = [
3355
3378
  "tracing-core",
3356
3379
  ]
3357
3380
 
3381
+ [[package]]
3382
+ name = "tracing-logfmt"
3383
+ version = "0.3.5"
3384
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3385
+ checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd"
3386
+ dependencies = [
3387
+ "time",
3388
+ "tracing",
3389
+ "tracing-core",
3390
+ "tracing-subscriber",
3391
+ ]
3392
+
3393
+ [[package]]
3394
+ name = "tracing-serde"
3395
+ version = "0.2.0"
3396
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3397
+ checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1"
3398
+ dependencies = [
3399
+ "serde",
3400
+ "tracing-core",
3401
+ ]
3402
+
3358
3403
  [[package]]
3359
3404
  name = "tracing-subscriber"
3360
- version = "0.3.22"
3405
+ version = "0.3.19"
3361
3406
  source = "registry+https://github.com/rust-lang/crates.io-index"
3362
- checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
3407
+ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
3363
3408
  dependencies = [
3364
3409
  "matchers",
3365
3410
  "nu-ansi-term",
3366
3411
  "once_cell",
3367
- "regex-automata",
3412
+ "regex",
3413
+ "serde",
3414
+ "serde_json",
3368
3415
  "sharded-slab",
3369
3416
  "smallvec",
3370
3417
  "thread_local",
3371
3418
  "tracing",
3372
3419
  "tracing-core",
3373
3420
  "tracing-log",
3421
+ "tracing-serde",
3374
3422
  ]
3375
3423
 
3376
3424
  [[package]]
@@ -3566,7 +3614,7 @@ dependencies = [
3566
3614
  "bumpalo",
3567
3615
  "proc-macro2",
3568
3616
  "quote",
3569
- "syn 2.0.111",
3617
+ "syn 2.0.112",
3570
3618
  "wasm-bindgen-shared",
3571
3619
  ]
3572
3620
 
@@ -3670,7 +3718,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
3670
3718
  dependencies = [
3671
3719
  "proc-macro2",
3672
3720
  "quote",
3673
- "syn 2.0.111",
3721
+ "syn 2.0.112",
3674
3722
  ]
3675
3723
 
3676
3724
  [[package]]
@@ -3681,7 +3729,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
3681
3729
  dependencies = [
3682
3730
  "proc-macro2",
3683
3731
  "quote",
3684
- "syn 2.0.111",
3732
+ "syn 2.0.112",
3685
3733
  ]
3686
3734
 
3687
3735
  [[package]]
@@ -3994,7 +4042,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
3994
4042
  dependencies = [
3995
4043
  "proc-macro2",
3996
4044
  "quote",
3997
- "syn 2.0.111",
4045
+ "syn 2.0.112",
3998
4046
  "synstructure",
3999
4047
  ]
4000
4048
 
@@ -4015,7 +4063,7 @@ checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a"
4015
4063
  dependencies = [
4016
4064
  "proc-macro2",
4017
4065
  "quote",
4018
- "syn 2.0.111",
4066
+ "syn 2.0.112",
4019
4067
  ]
4020
4068
 
4021
4069
  [[package]]
@@ -4035,7 +4083,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
4035
4083
  dependencies = [
4036
4084
  "proc-macro2",
4037
4085
  "quote",
4038
- "syn 2.0.111",
4086
+ "syn 2.0.112",
4039
4087
  "synstructure",
4040
4088
  ]
4041
4089
 
@@ -4075,11 +4123,11 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
4075
4123
  dependencies = [
4076
4124
  "proc-macro2",
4077
4125
  "quote",
4078
- "syn 2.0.111",
4126
+ "syn 2.0.112",
4079
4127
  ]
4080
4128
 
4081
4129
  [[package]]
4082
4130
  name = "zmij"
4083
- version = "1.0.0"
4131
+ version = "1.0.6"
4084
4132
  source = "registry+https://github.com/rust-lang/crates.io-index"
4085
- checksum = "e6d6085d62852e35540689d1f97ad663e3971fc19cf5eceab364d62c646ea167"
4133
+ checksum = "aac060176f7020d62c3bcc1cdbcec619d54f48b07ad1963a3f80ce7a0c17755f"
@@ -49,7 +49,8 @@ rand = "0.8.5"
49
49
  # pyo3 = { version = "0.23.1", features = ["abi3-py38"] }
50
50
  # pyo3-log = "0.11.0"
51
51
  tracing = { version = "0.1.40", optional = false }
52
- tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
52
+ tracing-subscriber = { version = "=0.3.19", features = ["env-filter", "json"] }
53
+ tracing-logfmt = "0.3"
53
54
  tracing-log = "0.2.0"
54
55
  signal-hook = "0.3.17"
55
56
  serde_json = "1.0.132"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quebec
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -17,13 +17,13 @@ Classifier: Operating System :: Microsoft :: Windows
17
17
  Classifier: Operating System :: POSIX
18
18
  Classifier: Operating System :: Unix
19
19
  Classifier: Operating System :: MacOS
20
- Requires-Dist: pytest>=7.0.0 ; extra == 'test'
21
- Requires-Dist: pytest-cov ; extra == 'test'
22
20
  Requires-Dist: sphinx>=7.0 ; extra == 'docs'
23
21
  Requires-Dist: shibuya ; extra == 'docs'
24
22
  Requires-Dist: myst-parser ; extra == 'docs'
25
- Provides-Extra: test
23
+ Requires-Dist: pytest>=7.0.0 ; extra == 'test'
24
+ Requires-Dist: pytest-cov ; extra == 'test'
26
25
  Provides-Extra: docs
26
+ Provides-Extra: test
27
27
  License-File: LICENSE
28
28
  Summary: Quebec is a simple background task queue for processing asynchronous tasks.
29
29
  Keywords: solid_queue,postgresql,mysql,sqlite,queue
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "quebec"
3
- version = "0.2.1"
3
+ version = "0.2.3"
4
4
  requires-python = ">=3.9"
5
5
  classifiers = [
6
6
  "Programming Language :: Rust",
@@ -1,5 +1,6 @@
1
- from .quebec import * # NOQA
1
+ from .quebec import * # NOQA
2
2
  from . import quebec
3
+ from . import sqlalchemy # NOQA
3
4
  from .quebec import Quebec, ActiveJob
4
5
  import logging
5
6
  import time
@@ -30,8 +31,8 @@ class JobBuilder:
30
31
 
31
32
  def _calculate_scheduled_at(self) -> Optional[datetime]:
32
33
  """Calculate scheduled_at from wait or wait_until options."""
33
- wait = self.options.get('wait')
34
- wait_until = self.options.get('wait_until')
34
+ wait = self.options.get("wait")
35
+ wait_until = self.options.get("wait_until")
35
36
 
36
37
  if wait_until is not None:
37
38
  if isinstance(wait_until, datetime):
@@ -53,19 +54,19 @@ class JobBuilder:
53
54
 
54
55
  return None
55
56
 
56
- def perform_later(self, qc: 'Quebec', *args, **kwargs) -> 'ActiveJob':
57
+ def perform_later(self, qc: "Quebec", *args, **kwargs) -> "ActiveJob":
57
58
  """Enqueue the job with configured options."""
58
59
  scheduled_at = self._calculate_scheduled_at()
59
60
 
60
61
  # Pass internal options via kwargs (will be filtered out before serialization)
61
62
  if scheduled_at is not None:
62
- kwargs['_scheduled_at'] = scheduled_at.timestamp()
63
+ kwargs["_scheduled_at"] = scheduled_at.timestamp()
63
64
 
64
- if 'queue' in self.options:
65
- kwargs['_queue'] = self.options['queue']
65
+ if "queue" in self.options:
66
+ kwargs["_queue"] = self.options["queue"]
66
67
 
67
- if 'priority' in self.options:
68
- kwargs['_priority'] = self.options['priority']
68
+ if "priority" in self.options:
69
+ kwargs["_priority"] = self.options["priority"]
69
70
 
70
71
  # Call the original perform_later
71
72
  return self.job_class.perform_later(qc, *args, **kwargs)
@@ -73,18 +74,22 @@ class JobBuilder:
73
74
 
74
75
  class NoNewOverrideMeta(type):
75
76
  def __new__(cls, name, bases, dct):
76
- if '__new__' in dct:
77
+ if "__new__" in dct:
77
78
  raise TypeError(f"Overriding __new__ is not allowed in class {name}")
78
- if '__init__' in dct:
79
+ if "__init__" in dct:
79
80
  raise TypeError(f"Overriding __init__ is not allowed in class {name}")
80
81
  return super().__new__(cls, name, bases, dct)
81
82
 
83
+
82
84
  class BaseClass(ActiveJob, metaclass=NoNewOverrideMeta):
83
85
  @classmethod
84
- def set(cls, wait: Union[int, float, timedelta] = None,
85
- wait_until: datetime = None,
86
- queue: str = None,
87
- priority: int = None) -> JobBuilder:
86
+ def set(
87
+ cls,
88
+ wait: Union[int, float, timedelta] = None,
89
+ wait_until: datetime = None,
90
+ queue: str = None,
91
+ priority: int = None,
92
+ ) -> JobBuilder:
88
93
  """Configure job options before enqueueing.
89
94
 
90
95
  Args:
@@ -103,13 +108,13 @@ class BaseClass(ActiveJob, metaclass=NoNewOverrideMeta):
103
108
  """
104
109
  options = {}
105
110
  if wait is not None:
106
- options['wait'] = wait
111
+ options["wait"] = wait
107
112
  if wait_until is not None:
108
- options['wait_until'] = wait_until
113
+ options["wait_until"] = wait_until
109
114
  if queue is not None:
110
- options['queue'] = queue
115
+ options["queue"] = queue
111
116
  if priority is not None:
112
- options['priority'] = priority
117
+ options["priority"] = priority
113
118
  return JobBuilder(cls, **options)
114
119
 
115
120
 
@@ -142,7 +147,9 @@ class ThreadedRunner:
142
147
  except (queue.ShutDown, KeyboardInterrupt):
143
148
  break
144
149
  except Exception as e:
145
- logger.error(f"Unexpected exception in ThreadedRunner: {e}", exc_info=True)
150
+ logger.error(
151
+ f"Unexpected exception in ThreadedRunner: {e}", exc_info=True
152
+ )
146
153
  finally:
147
154
  self.cleanup()
148
155
 
@@ -151,7 +158,7 @@ class ThreadedRunner:
151
158
  def cleanup(self):
152
159
  """Cleanup after job execution"""
153
160
  try:
154
- if self.execution and hasattr(self.execution, 'cleanup'):
161
+ if self.execution and hasattr(self.execution, "cleanup"):
155
162
  self.execution.cleanup()
156
163
  except Exception as e:
157
164
  logger.error(f"Error in cleanup: {e}", exc_info=True)
@@ -197,11 +204,11 @@ def _quebec_start(
197
204
  self.spawn_all()
198
205
  else:
199
206
  for component in spawn:
200
- if component == 'worker':
207
+ if component == "worker":
201
208
  self.spawn_job_claim_poller()
202
- elif component == 'dispatcher':
209
+ elif component == "dispatcher":
203
210
  self.spawn_dispatcher()
204
- elif component == 'scheduler':
211
+ elif component == "scheduler":
205
212
  self.spawn_scheduler()
206
213
  else:
207
214
  raise ValueError(f"Unknown component: {component}")
@@ -225,15 +232,15 @@ def _quebec_start(
225
232
  # Start worker threads as daemon so program can exit after start()
226
233
  worker_threads = []
227
234
  for i in range(threads):
228
- t = threading.Thread(target=run_worker, name=f'quebec-worker-{i}', daemon=True)
235
+ t = threading.Thread(target=run_worker, name=f"quebec-worker-{i}", daemon=True)
229
236
  t.start()
230
237
  worker_threads.append(t)
231
238
 
232
239
  # Store state by instance id
233
240
  _quebec_state[id(self)] = {
234
- 'shutdown_event': shutdown_event,
235
- 'job_queue': job_queue,
236
- 'worker_threads': worker_threads,
241
+ "shutdown_event": shutdown_event,
242
+ "job_queue": job_queue,
243
+ "worker_threads": worker_threads,
237
244
  }
238
245
 
239
246
  return self # Enable chaining: qc.start().wait()
@@ -254,14 +261,14 @@ def _quebec_wait(self):
254
261
  raise RuntimeError("Quebec not started. Call start() first.")
255
262
 
256
263
  try:
257
- while not state['shutdown_event'].is_set():
264
+ while not state["shutdown_event"].is_set():
258
265
  time.sleep(0.5)
259
266
  except KeyboardInterrupt:
260
- logger.debug('KeyboardInterrupt, shutting down...')
267
+ logger.debug("KeyboardInterrupt, shutting down...")
261
268
  self.graceful_shutdown()
262
269
  finally:
263
270
  # Wait for worker threads to finish
264
- for t in state['worker_threads']:
271
+ for t in state["worker_threads"]:
265
272
  t.join(timeout=5.0)
266
273
  _quebec_state.pop(id(self), None)
267
274