primitive 0.2.44__py3-none-any.whl → 0.2.45__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
1
  # SPDX-FileCopyrightText: 2025-present Dylan Stein <dylan@primitive.tech>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.2.44"
4
+ __version__ = "0.2.45"
@@ -96,7 +96,14 @@ class Agent(BaseAction):
96
96
  job_run_status = job_run_data.get("jobRun", {}).get("status", None)
97
97
 
98
98
  while job_run_status != "in_progress":
99
- if job_run_status == "pending":
99
+ if job_run_status == "request_completed":
100
+ logger.error(
101
+ f"JobRun {job_run_data.get('name')} is already completed. Exiting."
102
+ )
103
+ if RUNNING_IN_CONTAINER:
104
+ logger.info("Running in container, exiting after job run")
105
+ return
106
+ elif job_run_status == "pending":
100
107
  # we are setting to request_in_progress here which puts a started_at time on the JobRun in the API's database
101
108
  # any time spent pulling Git repositories, setting up, etc, counts as compute time
102
109
  self.primitive.jobs.job_run_update(
@@ -111,12 +118,11 @@ class Agent(BaseAction):
111
118
  job_run_data = job_run_result.data.get("jobRun", {})
112
119
  job_run_status = job_run_data.get("status", None)
113
120
 
114
- runner = Runner(
115
- primitive=self.primitive,
116
- job_run=job_run_data,
117
- )
118
-
119
121
  try:
122
+ runner = Runner(
123
+ primitive=self.primitive,
124
+ job_run=job_run_data,
125
+ )
120
126
  runner.setup()
121
127
  except Exception as exception:
122
128
  logger.exception(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primitive
3
- Version: 0.2.44
3
+ Version: 0.2.45
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
@@ -1,9 +1,9 @@
1
- primitive/__about__.py,sha256=nD4T6DRAwZX7Osoimqtf1Jwu6KoJDMk9mdI6wuoA4NY,130
1
+ primitive/__about__.py,sha256=b6146oibrogo0lVIsRvl6Dq45d4a0itTdIJa9xX11b0,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=IolgvWtdBleahMKbe787UQP_qaarhKZDtQygoz-6wnQ,6625
6
+ primitive/agent/actions.py,sha256=Ald56Lq8KOtQ0_eFm2TseKkEIa8RP3IClLNVyv9IL4E,7035
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.44.dist-info/METADATA,sha256=tXtSib6WFcP3S1r4WDcB45W60OS_2YHzUWVKJg_33ck,3535
99
- primitive-0.2.44.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- primitive-0.2.44.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
101
- primitive-0.2.44.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
102
- primitive-0.2.44.dist-info/RECORD,,
98
+ primitive-0.2.45.dist-info/METADATA,sha256=roQ2gq_c2R7UJ7Rprv1rqV_tASWOB4q86QujQ4mjor8,3535
99
+ primitive-0.2.45.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ primitive-0.2.45.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
101
+ primitive-0.2.45.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
102
+ primitive-0.2.45.dist-info/RECORD,,