Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quota recalculation logic consolidation #3734

Merged
merged 7 commits into from Mar 9, 2017

Conversation

Projects
None yet
4 participants
@dannon
Copy link
Member

commented Mar 9, 2017

Refactors quota recalculation, tested logout and admin reset functionality w/ both sqlite and postgres, seems to work well -- having a hard time locating a bug corresponding to reports that it isn't working for users when they log out. We can keep an eye on that, though.

@galaxybot galaxybot added this to the 17.05 milestone Mar 9, 2017

@dannon

This comment has been minimized.

Copy link
Member Author

commented Mar 9, 2017

(could probably refactor a bit more to push pgcalc into calculate_user_disk_usage, but I didn't know of the downstream effects of that, if any, so I didn't want to touch it yet)

new = pgcalc(sa_session, user.id)
user.set_disk_usage(new)
sa_session.add(user)
sa_session.flush()

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo Mar 9, 2017

Member

Should we keep the:

        if user:

?

This comment has been minimized.

Copy link
@dannon

dannon Mar 9, 2017

Author Member

I removed it because I'm not sure how it'd possibly happen, but I guess it can't hurt.

else:
log.error("Recalculate user disk usage task failed, user %s not found" % user_id)
else:
log.error("Recalculate user disk usage task received without user_id." % user_id)

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo Mar 9, 2017

Member

Remove % user_id

@nsoranzo

This comment has been minimized.

Copy link
Member

commented on 2d964eb Mar 9, 2017

😆

@martenson martenson merged commit 8911e49 into galaxyproject:dev Mar 9, 2017

5 checks passed

api test Build finished. 263 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 140 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 24 tests run, 0 skipped, 0 failed.
Details
toolshed test Build finished. 580 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.