flux-batch 0.0.11__py3-none-any.whl → 0.0.12__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.
@@ -38,6 +38,8 @@ class JournalScribe:
38
38
  logger.critical(f"Failed to connect to Flux: {e}")
39
39
  sys.exit(1)
40
40
 
41
+ logger.info(f"🍳 Handle: {self.handle.attr_get('local-uri')}")
42
+
41
43
  # Initialize Journal Consumer
42
44
  # This consumes the global event log for the entire instance
43
45
  self.consumer = flux.job.JournalConsumer(self.handle)
@@ -18,6 +18,7 @@ def _record_event_internal(session, cluster: str, event: Dict[str, Any]):
18
18
  data = event.get("payload", {})
19
19
  timestamp = event.get("timestamp", time.time())
20
20
 
21
+ # Add the new event with all metadata
21
22
  new_event = EventModel(
22
23
  job_id=job_id,
23
24
  cluster=cluster,
@@ -90,5 +90,9 @@ class EventModel(Base):
90
90
  Helper to convert ORM model to public DTO
91
91
  """
92
92
  return EventRecord(
93
- timestamp=self.timestamp, event_type=self.event_type, payload=self.payload
93
+ timestamp=self.timestamp,
94
+ event_type=self.event_type,
95
+ payload=self.payload,
96
+ cluster=self.cluster,
97
+ job_id=self.job_id,
94
98
  )
flux_batch/version.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.0.11"
1
+ __version__ = "0.0.12"
2
2
  AUTHOR = "Vanessa Sochat"
3
3
  AUTHOR_EMAIL = "vsoch@users.noreply.github.com"
4
4
  NAME = "flux-batch"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flux-batch
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: Python SDK for flux batch jobs and services
5
5
  Home-page: https://github.com/converged-computing/flux-batch
6
6
  Author: Vanessa Sochat
@@ -135,7 +135,7 @@ batch.add_job(["sleep", "5"])
135
135
  batch.add_job(["echo", "Job 2 finished"])
136
136
 
137
137
  # Wrap it up into a jobspec
138
- jobspec = flux_batch.BatchJobspecV1.from_jobs(
138
+ spec = flux_batch.BatchJobspecV1.from_jobs(
139
139
  batch,
140
140
  nodes=1,
141
141
  nslots=1,
@@ -146,14 +146,15 @@ jobspec = flux_batch.BatchJobspecV1.from_jobs(
146
146
  )
147
147
 
148
148
  # Add a prolog and epilog
149
- jobspec.add_prolog("echo 'Batch Wrapper Starting'")
150
- jobspec.add_epilog("echo 'Batch Wrapper Finished'")
149
+ spec.add_prolog("echo 'Batch Wrapper Starting'")
150
+ spec.add_epilog("echo 'Batch Wrapper Finished'")
151
151
 
152
152
  # Add a service (this assumes user level that exists)
153
- jobspec.add_service("flux-scribe")
153
+ spec.add_service("flux-scribe")
154
154
 
155
- # Preview it
156
- print(flux_batch.submit(handle, jobspec, dry_run=True))
155
+ # Preview it (batch wrapper), or generate the jobspec (json)
156
+ print(flux_batch.submit(handle, spec, dry_run=True))
157
+ jobspec = flux_batch.jobspec(spec)
157
158
 
158
159
  # Submit that bad boi.
159
160
  jobid = flux_batch.submit(handle, jobspec)
@@ -2,7 +2,7 @@ flux_batch/__init__.py,sha256=35032OVyHkBiQIptg7NBY_6mdhthFu1hpqOCsREm5lQ,280
2
2
  flux_batch/jobspec.py,sha256=MUMI4Y_DgjCRssgzUDagTTFw8L3t4L_5az1E3tmT1FI,5464
3
3
  flux_batch/models.py,sha256=JjrFqi4Skrop_cyIWfgAHTdY53kotkiGD0JpTnVlByI,2200
4
4
  flux_batch/submit.py,sha256=tNJMDvnsxbAuXg_5TkB8HurzQ9I-Dot_gXXpIU5LtTA,2654
5
- flux_batch/version.py,sha256=h-6jDEwrQuFPdUK7HJbFYJISN7mt1MwBKK0UnnS1-cM,643
5
+ flux_batch/version.py,sha256=37BBFelchDrkt6_VMHK5S2_2983PJm2IQL7r_jhocWU,643
6
6
  flux_batch/logger/__init__.py,sha256=eDdpw_uppR5mPLHE39qT_haqMxu-2wniLlJZDigRC2k,52
7
7
  flux_batch/logger/generate.py,sha256=L9JyMY2oapp0ss7f7LGuihbLomzVJsMq7sByy9NhbZI,4017
8
8
  flux_batch/logger/logger.py,sha256=HKymVBNcoPdX87QWy69er5wUzHVeriiKp9p0bIYboUo,5927
@@ -11,18 +11,18 @@ flux_batch/script/save_logs.sh,sha256=HeapqvL0iR8aX7LtbwlcFTy19j5WxkQ-1M2J9epu-E
11
11
  flux_batch/service/__init__.py,sha256=pD7RYpdSLZvYU4qwShYXA6UcaJy191fKtzqJL3uttEc,2724
12
12
  flux_batch/service/scribe.py,sha256=dY6geiLvXYIRcIzuP_naZscKgzX4Y5dPzxoWf9Wywg0,253
13
13
  flux_batch/service/scribe/__init__.py,sha256=773-AzF_WRY6udG5nQSexf7Vga4K1YZLy1sfQAEd1uo,126
14
- flux_batch/service/scribe/__main__.py,sha256=3S0dyhkHk-bPT_Z0laNUg-HydrCFql4hPOV2ZNF5rO0,3777
15
- flux_batch/service/scribe/database.py,sha256=EB8OEMfNvfCplGaz-ZNMsfIpd305eP-mfCvSd-fg_k4,5626
16
- flux_batch/service/scribe/models.py,sha256=7lUrRosnQ2douFL_xD9GMYex4Z4lkN-CcBeWDhzmD8c,2668
14
+ flux_batch/service/scribe/__main__.py,sha256=xQHIxRd2pjGxpVcIyv2tq88ts3e2IsmhrQuMVG-wrOw,3851
15
+ flux_batch/service/scribe/database.py,sha256=kagh_YJFpKMtixJ5-Zs762vLFDGEU7Fq9lOYEgeKPmo,5668
16
+ flux_batch/service/scribe/models.py,sha256=wVHgX5X9PUpUSDtZtMaz1M_fGC1Vyv8JdUt58AoEA3c,2759
17
17
  flux_batch/service/scribe/template.py,sha256=yDsheid2FXeYr458loxB3HyZKSWpGQpM8iUQfnfOA-s,1336
18
18
  flux_batch/utils/__init__.py,sha256=CqMhw_mBfR0HBcHwv7LtFITq0J7LBV413VQE9xrz8ks,42
19
19
  flux_batch/utils/fileio.py,sha256=Elz8WkNkJ9B6x7WmCwiIBW0GgsRSSFCcbuJh7aqu2z4,4879
20
20
  flux_batch/utils/text.py,sha256=Ci1BqHs2IbOSn2o60zhLkT4kIA7CSNuGj8mdiGaDIGk,606
21
21
  flux_batch/utils/timer.py,sha256=_Weec7Wd5hWQ1r4ZHjownG4YdoIowpVqilXhvYFmIgA,491
22
- flux_batch-0.0.11.dist-info/LICENSE,sha256=AlyLB1m_z0CENCx1ob0PedLTTohtH2VLZhs2kfygrfc,1108
23
- flux_batch-0.0.11.dist-info/METADATA,sha256=A0LLvVm-RKGxSM26HMfHlOKe5OxF22O7APLNWfvIBj0,5352
24
- flux_batch-0.0.11.dist-info/NOTICE,sha256=9CR93geVKl_4ZrJORbXN0fzkEM2y4DglWhY1hn9ZwQw,1167
25
- flux_batch-0.0.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
26
- flux_batch-0.0.11.dist-info/entry_points.txt,sha256=ynoKpD82xn2V2sD-aZIQoq7NnfOu9VEKqW55Y1AoPGI,67
27
- flux_batch-0.0.11.dist-info/top_level.txt,sha256=jj8zAsZzMmbjiBISJL7lRtA37MSEAQYfObGLUncn9Lw,11
28
- flux_batch-0.0.11.dist-info/RECORD,,
22
+ flux_batch-0.0.12.dist-info/LICENSE,sha256=AlyLB1m_z0CENCx1ob0PedLTTohtH2VLZhs2kfygrfc,1108
23
+ flux_batch-0.0.12.dist-info/METADATA,sha256=AFex8ldVck2zs5c1ID2P1VEbiuJ0-sL8EzcWDn_bdyM,5420
24
+ flux_batch-0.0.12.dist-info/NOTICE,sha256=9CR93geVKl_4ZrJORbXN0fzkEM2y4DglWhY1hn9ZwQw,1167
25
+ flux_batch-0.0.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
26
+ flux_batch-0.0.12.dist-info/entry_points.txt,sha256=ynoKpD82xn2V2sD-aZIQoq7NnfOu9VEKqW55Y1AoPGI,67
27
+ flux_batch-0.0.12.dist-info/top_level.txt,sha256=jj8zAsZzMmbjiBISJL7lRtA37MSEAQYfObGLUncn9Lw,11
28
+ flux_batch-0.0.12.dist-info/RECORD,,