Skip to content
Snippets Groups Projects
Commit 18475576 authored by Chris Hines's avatar Chris Hines
Browse files

speed up the default slurm provisioing by running groups of users rather than...

speed up the default slurm provisioing by running groups of users rather than adding each user individually
parent 40960e15
No related branches found
No related tags found
1 merge request!33Multiple fixes
...@@ -68,9 +68,21 @@ s.searchFilter = "{{ search_filter }}" ...@@ -68,9 +68,21 @@ s.searchFilter = "{{ search_filter }}"
users=get_users(s) users=get_users(s)
mk_slurmaccount("default") mk_slurmaccount("default")
usergrouplist=[]
userlist=[]
i=0
for user in users: for user in users:
if i==200:
i=0
usergrouplist.append(",".join(userlist))
userlist=[]
i=i+1
userlist.append(users[user].entry['uid'][0])
usergrouplist.append(",".join(userlist))
for usergroup in usergrouplist:
try: try:
mk_slurmuser(users[user].entry['uid'][0],"default") mk_slurmuser(usergroup,"default")
except: except:
print traceback.format_exc() print traceback.format_exc()
pass pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment