Skip to content

Commit

Permalink
bulk_update.py: add "max_jobs" key-value pair
Browse files Browse the repository at this point in the history
Add the "max_jobs" key-value pair to each user's
payload information to be sent to the priority plugin.
  • Loading branch information
cmoussa1 committed Jul 26, 2021
1 parent 849e40b commit df3fea3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/bulk_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ def bulk_update(path):

# fetch all rows from association_table (will print out tuples)
for row in cur.execute(
"SELECT userid, bank, default_bank, fairshare FROM association_table"
"SELECT userid, bank, default_bank, fairshare, max_jobs FROM association_table"
):
# create a JSON payload with the results of the query
data = {
"userid": str(row[0]),
"bank": str(row[1]),
"default_bank": str(row[2]),
"fairshare": str(row[3]),
"max_jobs": str(row[4]),
}

flux.Flux().rpc("job-manager.mf_priority.rec_update", data).get()
Expand Down

0 comments on commit df3fea3

Please sign in to comment.