Skip to content

Commit

Permalink
t: update helper script, expected output
Browse files Browse the repository at this point in the history
Problem: There is a helper script that inserts test job records into the
"jobs" table that needs its INSERT statement to be updated to account
for the addition of the "project" column. There is also an expected
output file that needs to be updated to also account for the new
"Project" column in the output of the view-job-records command.

Update both of these in accordance with the addition of the "project"
column to the "jobs" table in the flux-accounting DB.
  • Loading branch information
cmoussa1 committed Sep 17, 2024
1 parent f0affa0 commit 105329b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/expected/job_usage/no_jobs.expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
UserID Username JobID T_Submit T_Run T_Inactive Nodes
UserID Username JobID T_Submit T_Run T_Inactive Nodes Project
6 changes: 5 additions & 1 deletion t/scripts/insert_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def main():
t_inactive_two_weeks = time.time() - (604861 * 2) # more than 2 weeks old
t_inactive_old = time.time() - (604861 * 27) # more than six months old
ranks = r = jobspec = ""
insert_stmt = "INSERT INTO jobs VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
insert_stmt = """
INSERT INTO jobs
(id, userid, t_submit, t_run, t_inactive, ranks, R, jobspec)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
"""

cur.execute(
insert_stmt,
Expand Down

0 comments on commit 105329b

Please sign in to comment.