Skip to content

Commit

Permalink
Remove tasks (#1468)
Browse files Browse the repository at this point in the history
* Remove tasks references from api

* Remove settings from main

* Remove tasks from helm
  • Loading branch information
Tansito authored Aug 26, 2024
1 parent 16bbfcd commit 81cc293
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 264 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ spec:
secretKeyRef:
name: {{ .Values.secrets.servicePsql.name }}
key: {{ .Values.secrets.servicePsql.key.databasePassword }}
- name: PROVIDERS_CONFIGURATION
value: "{{ .Values.tasks.providersConfiguration }}"
- name: FUNCTIONS_PERMISSIONS
value: "{{ .Values.tasks.functionsPermissions }}"
- name: PUBLIC_GROUP_NAME
value: {{ .Values.application.publicGroupName }}
{{- with .Values.nodeSelector }}
Expand Down
4 changes: 0 additions & 4 deletions charts/qiskit-serverless/charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ application:
cos:
claimName: gateway-claim

tasks:
providersConfiguration: '{}'
functionsPermissions: '{}'

secrets:
secretKey:
create: true
Expand Down
18 changes: 0 additions & 18 deletions gateway/api/apps.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
"""Applications."""

from django.apps import AppConfig
from django.db.models.signals import post_migrate


def on_migrations_applied(sender, **kwargs): # pylint: disable=unused-argument
"""
This method will run tasks to populate the DB after the migration
"""
# This import may be here for the correct initialization of the App
from api.tasks import ( # pylint: disable=import-outside-toplevel
programs,
providers,
)

providers.assign_admin_groups()
programs.assign_run_permission()


class ApiConfig(AppConfig):
"""ApiConfig."""

default_auto_field = "django.db.models.BigAutoField"
name = "api"

def ready(self):
post_migrate.connect(on_migrations_applied, sender=self)
Empty file removed gateway/api/tasks/__init__.py
Empty file.
68 changes: 0 additions & 68 deletions gateway/api/tasks/programs.py

This file was deleted.

63 changes: 0 additions & 63 deletions gateway/api/tasks/providers.py

This file was deleted.

9 changes: 0 additions & 9 deletions gateway/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,5 @@
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_AGE = 3600

# Providers setup
PROVIDERS_CONFIGURATION = os.environ.get("PROVIDERS_CONFIGURATION", "{}")

# Function permissions
FUNCTIONS_PERMISSIONS = os.environ.get(
"FUNCTIONS_PERMISSIONS",
"{}",
)

# Public group name
PUBLIC_GROUP_NAME = os.environ.get("PUBLIC_GROUP_NAME", "ibm-q/open/main")
Empty file.
66 changes: 0 additions & 66 deletions gateway/tests/api/tasks/test_tasks.py

This file was deleted.

32 changes: 0 additions & 32 deletions gateway/tests/fixtures/tasks_fixtures.json

This file was deleted.

0 comments on commit 81cc293

Please sign in to comment.