Page MenuHomeSoftware Heritage
Paste P1017

django custom command shenanigans...
ActivePublic

Authored by ardumont on Apr 26 2021, 3:05 PM.
Not working:
```
kubectl exec -ti deployment/webapp -- bash
+ LOCAL_CMD=/usr/local/bin/kubectl
+ '[' -f /usr/local/bin/kubectl ']'
+ cmd=/usr/local/bin/kubectl
+ /usr/local/bin/kubectl exec -ti deployment/webapp -- bash
swh@webapp-cff66565-jj778:/$ env | grep -i django
DJANGO_SETTINGS_MODULE=swh.web.settings.production
swh@webapp-cff66565-jj778:/$ ls -lah /app/swh-web/swh/web/management/commands/refresh_savecodenow_statuses.py
-rw-r--r-- 1 root root 821 Apr 26 12:39 /app/swh-web/swh/web/management/commands/refresh_savecodenow_statuses.py
swh@webapp-cff66565-jj778:/$ python3 /app/swh-web/swh/web/manage.py refresh_savecodenow_statuses
Unknown command: 'refresh_savecodenow_statuses'
Type 'manage.py help' for usage.
```
Working (current diff):
```
+ /usr/local/bin/kubectl exec -ti deployment/webapp -- bash
swh@webapp-75f4bc4f5-fxw62:/$ env | grep -i django
DJANGO_SETTINGS_MODULE=swh.web.settings.production
swh@webapp-75f4bc4f5-fxw62:/$ ls -lah /app/swh-web/swh/web/common/management/commands/refresh_savecodenow_statuses.py
-rw-r--r-- 1 root root 821 Apr 26 12:39 /app/swh-web/swh/web/common/management/commands/refresh_savecodenow_statuses.py
swh@webapp-75f4bc4f5-fxw62:/$ python3 /app/swh-web/swh/web/manage.py refresh_savecodenow_statuses
/srv/softwareheritage/venv/lib/python3.7/site-packages/jose/backends/cryptography_backend.py:18: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes, int_to_bytes
Nothing to do.
```

Event Timeline

ardumont changed the title of this paste from untitled to django custom command shenanigans....Apr 26 2021, 3:11 PM
ardumont edited the content of this paste. (Show Details)