primitive 0.2.40__py3-none-any.whl → 0.2.43__py3-none-any.whl

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.
primitive/__about__.py CHANGED
@@ -1,4 +1,4 @@
1
- # SPDX-FileCopyrightText: 2024-present Dylan Stein <dylan@primitive.tech>
1
+ # SPDX-FileCopyrightText: 2025-present Dylan Stein <dylan@primitive.tech>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.2.40"
4
+ __version__ = "0.2.43"
@@ -92,20 +92,24 @@ class Agent(BaseAction):
92
92
  logger.info(
93
93
  f"Setting JobRun {job_run_data.get('job').get('name')} to request_in_progress"
94
94
  )
95
- # we are setting to request_in_progress here which puts a started_at time on the JobRun in the API's database
96
- # any time spent pulling Git repositories, setting up, etc, counts as compute time
97
- job_run_result = self.primitive.jobs.job_run_update(
98
- id=job_run_id, status="request_in_progress"
99
- )
100
95
 
101
- while job_run_data["status"] != "in_progress":
96
+ job_run_status = job_run_data.get("jobRun", {}).get("status", None)
97
+
98
+ while job_run_status != "in_progress":
99
+ if job_run_status == "pending":
100
+ # we are setting to request_in_progress here which puts a started_at time on the JobRun in the API's database
101
+ # any time spent pulling Git repositories, setting up, etc, counts as compute time
102
+ self.primitive.jobs.job_run_update(
103
+ id=job_run_id, status="request_in_progress"
104
+ )
102
105
  logger.info(
103
- f"Waiting for JobRun {job_run_data.get('name')} to be in_progress"
106
+ f"Waiting for JobRun {job_run_data.get('name')} to be in_progress. Current status: {job_run_status}"
104
107
  )
105
108
  sleep(1)
106
109
  job_run_result = self.primitive.jobs.get_job_run(id=job_run_id)
107
110
  if job_run_result.data is not None:
108
111
  job_run_data = job_run_result.data.get("jobRun", {})
112
+ job_run_status = job_run_data.get("status", None)
109
113
 
110
114
  runner = Runner(
111
115
  primitive=self.primitive,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primitive
3
- Version: 0.2.40
3
+ Version: 0.2.43
4
4
  Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
5
5
  Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
6
6
  Project-URL: Source, https://github.com//primitivecorp/primitive-cli
@@ -26,7 +26,6 @@ Requires-Dist: psutil>=7.0.0
26
26
  Requires-Dist: pyyaml
27
27
  Requires-Dist: rich>=13.9.4
28
28
  Requires-Dist: speedtest-cli
29
- Requires-Dist: sqlalchemy>=2.0.40
30
29
  Description-Content-Type: text/markdown
31
30
 
32
31
  # primitive
@@ -1,9 +1,9 @@
1
- primitive/__about__.py,sha256=-N-YEcje7MLM02Jm8r6LUtxrMeMa9BoEcthjPTtiwf4,130
1
+ primitive/__about__.py,sha256=TTzCV3SrjEKHsPXjNKoxagzE9VpD7it1nUOQIBCVYAo,130
2
2
  primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
3
3
  primitive/cli.py,sha256=g7EtHI9MATAB0qQu5w-WzbXtxz_8zu8z5E7sETmMkKU,2509
4
4
  primitive/client.py,sha256=RMF46F89oK82gfZH6Bf0WZrhXPUu01pbieSO_Vcuoc4,3624
5
5
  primitive/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- primitive/agent/actions.py,sha256=zQuxP7oGZ9PRIJLlJ5dhza-Vcg29gffRreCylDfYTtg,6365
6
+ primitive/agent/actions.py,sha256=IolgvWtdBleahMKbe787UQP_qaarhKZDtQygoz-6wnQ,6625
7
7
  primitive/agent/commands.py,sha256=o847pK7v7EWQGG67tky6a33qtwoutX6LZrP2FIS_NOk,388
8
8
  primitive/agent/runner.py,sha256=wkI7ANC9ob99Fy5UWJAj__Ah7f7gwMgrBJ_LgpWZf4A,15638
9
9
  primitive/agent/uploader.py,sha256=ZzrzsajNBogwEC7mT6Ejy0h2Jd9axMYGzt9pbCvVMlk,3171
@@ -95,8 +95,8 @@ primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,37
95
95
  primitive/utils/psutil.py,sha256=xa7ef435UL37jyjmUPbEqCO2ayQMpCs0HCrxVEvLcuM,763
96
96
  primitive/utils/shell.py,sha256=Z4zxmOaSyGCrS0D6I436iQci-ewHLt4UxVg1CD9Serc,2171
97
97
  primitive/utils/text.py,sha256=XiESMnlhjQ534xE2hMNf08WehE1SKaYFRNih0MmnK0k,829
98
- primitive-0.2.40.dist-info/METADATA,sha256=s_p97-BNDtg3IGKFAFv3d0sQjPUbfOEaNwknv__KjKg,3569
99
- primitive-0.2.40.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- primitive-0.2.40.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
101
- primitive-0.2.40.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
102
- primitive-0.2.40.dist-info/RECORD,,
98
+ primitive-0.2.43.dist-info/METADATA,sha256=-hnXstdh3wn8FBPBYTnA_lLap61LXjaLjiHwbz6MZz0,3535
99
+ primitive-0.2.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ primitive-0.2.43.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
101
+ primitive-0.2.43.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
102
+ primitive-0.2.43.dist-info/RECORD,,