Skip to content

Commit

Permalink
task/WP-834 - Add behavior for ignoring DesignSafe-Corral allocation …
Browse files Browse the repository at this point in the history
…for running jobs (#1057)

* Added changes to remove TAS projects that are purely administrative from default allocations, as they were preventing a few users from running jobs.

* Update server/portal/apps/users/views.py

---------

Co-authored-by: Chandra Y <cyemparala@tacc.utexas.edu>
Co-authored-by: Garrett Edmonds <43251554+edmondsgarrett@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 21, 2025
1 parent 96eb02e commit 7cfdea2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/portal/apps/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ def get(self, request):
"""
data = get_allocations(request.user.username)

# This line iterates through all the projects in the active allocations and filters out the ones that are excluded in settings.
filtered_projects = [project for project in data["active"] if project.get("projectName") not in settings.ALLOCATIONS_TO_EXCLUDE]

data["active"] = filtered_projects

return JsonResponse({"response": data})


Expand Down
4 changes: 4 additions & 0 deletions server/portal/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ def portal_filter(record):

PORTAL_APPS_DEFAULT_TAB = getattr(settings_custom, '_PORTAL_APPS_DEFAULT_TAB', '')

ALLOCATIONS_TO_EXCLUDE = (
getattr(settings_custom, "_ALLOCATIONS_TO_EXCLUDE", ["DesignSafe-DCV", "DesignSafe-Corral"])
)

PORTAL_JOB_NOTIFICATION_STATES = ["PENDING", "STAGING_INPUTS", "RUNNING", "ARCHIVING", "BLOCKED", "PAUSED", "FINISHED", "CANCELLED", "FAILED"]

WH_BASE_URL = getattr(settings_custom, '_WH_BASE_URL', '')
Expand Down

0 comments on commit 7cfdea2

Please sign in to comment.