Skip to content

Commit

Permalink
Prevent dataframe update if grouper_figtest set #73
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Oct 5, 2020
1 parent ea227e0 commit 49c3856
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
7 changes: 5 additions & 2 deletions requiam/grouper_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ def grouper_delta_user(group, stem, netid, uaid, action, grouper_dict,

# Update manual CSV file
if not isinstance(mo, type(None)):
mo.update_dataframe(netid, uaid, group, stem)
if production:
mo.update_dataframe(netid, uaid, group, stem)
else:
log.info("Working with figtest stem. Not updating dataframe")
else:
log.info('dry run, not performing synchronization')
log.info('dry run, not updating portal dataframe')
log.info('dry run, not updating dataframe')

return d
18 changes: 12 additions & 6 deletions scripts/user_update
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,12 @@ if __name__ == '__main__':
# Remove entry from manual CSV file for 'root' case
if args.sync:
# Update of df only needed since there's not root portal to add too
mo.update_dataframe(current_dict['not_portal']['netid'],
current_dict['not_portal']['uaid'],
vargs['portal'], 'portal')
if grouper_production:
mo.update_dataframe(current_dict['not_portal']['netid'],
current_dict['not_portal']['uaid'],
vargs['portal'], 'portal')
else:
log.info("Working with figtest stem. Not updating")
else:
log.info('dry run, not updating portal dataframe')

Expand Down Expand Up @@ -376,9 +379,12 @@ if __name__ == '__main__':
# Remove entry from manual CSV file for 'root' case
if args.sync:
# Update of df only needed since there's not root portal to add too
mo.update_dataframe(current_dict['not_quota']['netid'],
current_dict['not_quota']['uaid'],
vargs['quota'], 'quota')
if grouper_production:
mo.update_dataframe(current_dict['not_quota']['netid'],
current_dict['not_quota']['uaid'],
vargs['quota'], 'quota')
else:
log.info("Working with figtest stem. Not updating")
else:
log.info('dry run, not updating portal dataframe')

Expand Down

0 comments on commit 49c3856

Please sign in to comment.