Closed sumandari closed 3 years ago
Merging #1320 (3267b8a) into develop (dbf642b) will increase coverage by
0.41%
. The diff coverage is88.81%
.
@@ Coverage Diff @@
## develop #1320 +/- ##
===========================================
+ Coverage 63.41% 63.82% +0.41%
===========================================
Files 179 180 +1
Lines 9388 9541 +153
Branches 711 736 +25
===========================================
+ Hits 5953 6090 +137
- Misses 3205 3218 +13
- Partials 230 233 +3
Impacted Files | Coverage Δ | |
---|---|---|
...hanges/management/commands/remove_unused_images.py | 88.81% <88.81%> (ø) |
|
django_project/base/models/project.py | 90.29% <0.00%> (+0.49%) |
:arrow_up: |
django_project/base/forms.py | 80.67% <0.00%> (+0.84%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update dbf642b...3267b8a. Read the comment docs.
staging test
imageswsgi-79bfd5db5d-x9mbf:/home/web/django_project# ./manage.py remove_unused_i
environ({'DJANGO_SETTINGS_MODULE': 'core.settings.override_settings', 'LANG': 'C.UTF-8', 'HOSTNAME': 'uwsgi-79bfd5db5d-x9mbf', 'DEBUG': 'False', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'KUBERNETES_PORT_443_TCP_ADDR': '10.43.0.1', 'VIRTUAL_PORT': '8080', 'KUBERNETES_PORT': 'tcp://10.43.0.1:443', 'PWD': '/home/web/django_project', 'HOME': '/root', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'DEBIAN_FRONTEND': 'noninteractive', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'CRYPTOGRAPHY_DONT_BUILD_RUST': '1', 'KUBERNETES_PORT_443_TCP': 'tcp://10.43.0.1:443', 'DATABASE_NAME': 'gis', 'TERM': 'xterm-256color', 'DATABASE_USERNAME': 'docker', 'PYTHON_VERSION': '3.7.2', 'SHLVL': '1', 'KUBERNETES_SERVICE_PORT': '443', 'VIRTUAL_HOST': 'projecta.kartoza.com', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'DATABASE_HOST': 'db', 'KUBERNETES_SERVICE_HOST': '10.43.0.1', 'DATABASE_PASSWORD': 'docker', 'PYTHON_PIP_VERSION': '18.1', '_': './manage.py'})
environ({'DJANGO_SETTINGS_MODULE': 'core.settings.override_settings', 'LANG': 'C.UTF-8', 'HOSTNAME': 'uwsgi-79bfd5db5d-x9mbf', 'DEBUG': 'False', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'KUBERNETES_PORT_443_TCP_ADDR': '10.43.0.1', 'VIRTUAL_PORT': '8080', 'KUBERNETES_PORT': 'tcp://10.43.0.1:443', 'PWD': '/home/web/django_project', 'HOME': '/root', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'DEBIAN_FRONTEND': 'noninteractive', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'CRYPTOGRAPHY_DONT_BUILD_RUST': '1', 'KUBERNETES_PORT_443_TCP': 'tcp://10.43.0.1:443', 'DATABASE_NAME': 'gis', 'TERM': 'xterm-256color', 'DATABASE_USERNAME': 'docker', 'PYTHON_VERSION': '3.7.2', 'SHLVL': '1', 'KUBERNETES_SERVICE_PORT': '443', 'VIRTUAL_HOST': 'projecta.kartoza.com', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'DATABASE_HOST': 'db', 'KUBERNETES_SERVICE_HOST': '10.43.0.1', 'DATABASE_PASSWORD': 'docker', 'PYTHON_PIP_VERSION': '18.1', '_': './manage.py'})
DEBUG 2021-03-01 10:18:05,510 base 229 140528083031808 Configuring Raven for host: <raven.conf.remote.RemoteConfig object at 0x7fcf1c52d860>
-------------------------------------------------------------------------------
GitHub images: 31 files, ImageField images: 867 files, and All media images: 945 files.
GitHub images: 13.28 MB, ImageField images: 354.6 MB, All media images: 426.64 MB.
Do you want to delete unused Entry images 166 files, 74.77 MB? [Y/n] y
remove files...
remove /home/web/media/images/entries/8b51047c4dafca7eff4a9bf9468288b1ba406dc0.jpg
remove /home/web/media/images/entries/3d349be3b3f3185632bc5889786978359019077a.png
remove /home/web/media/images/entries/0849bfeb6305121a18a5457f2f95f66874346d12.png
remove /home/web/media/images/entries/103355731-61fcdf00-4a85-11eb-8e38-f745046f3730.gif
remove /home/web/media/images/entries/a5fcbea08ea9ffdd5b3e89e7812b14b5460ffcc7.png
remove /home/web/media/images/entries/be3985dc30de4607ab8aeacbf4288cc0a7dda720.png
remove /home/web/media/images/entries/70130218-70a97480-1680-11ea-9071-f3a1e2400af1.png
remove /home/web/media/images/entries/168e1cd2cc452e656c2a673dce4fa245ab56b2f0.png
remove /home/web/media/images/entries/99658744-3509e500-2a60-11eb-919e-858534d3e372.png
remove /home/web/media/images/entries/94795178-4c700e80-03dd-11eb-9f3e-30a7123c7bad.png
remove /home/web/media/images/entries/102950193-d4197500-4515-11eb-846a-8aaf63304bb7.png
remove /home/web/media/images/entries/8dc24d2b4f15f2440e1d3a6b164bc8e1339d8f97.png
remove /home/web/media/images/entries/85852152-6228d300-b7f3-11ea-96f3-b174fca02f05.png
remove /home/web/media/images/entries/3a3e5a731f57e008c4286ede82965b879964dd04.png
remove /home/web/media/images/entries/65e72d5e764212b9fdd49a82b02c3238c43077d2.png
remove /home/web/media/images/entries/af13860d69c6febcda1603c56ccf28adb576f8b4.png
remove /home/web/media/images/entries/d015b9d1f4e81e39920d738caed63f9bb19a934d.gif
remove /home/web/media/images/entries/97660667-fc5c9880-1abd-11eb-8684-9887daf7bbcd.gif
remove /home/web/media/images/entries/1c60cca50c741dbb53c577066fd73b6ef2bc59a7.png
remove /home/web/media/images/entries/676bcdda8e4fdd1590ed6194874e2d07fb93c044.jpg
remove /home/web/media/images/entries/93023061-9f2f8500-f5ec-11ea-8a4c-b3b763b00fca.png
remove /home/web/media/images/entries/104206261-b1d49200-5405-11eb-8022-2f913f6bf58f.gif
remove /home/web/media/images/entries/35097829-85fa9e64-fc5a-11e7-831d-5e4f0dbf5971.png
remove /home/web/media/images/entries/96567932-a9b5fc00-12c7-11eb-8a80-89443861f447.png
remove /home/web/media/images/entries/87ed29fa57120bf9060d1a4726313762b6cd8e17.png
remove /home/web/media/images/entries/0ebfff84915cb70809a3e302237aa43994a7bb10.png
remove /home/web/media/images/entries/64422989-96e66500-d0cf-11e9-914a-90ba1c99fb74.png
remove /home/web/media/images/entries/711e553c56cf1d5a9885f1907b0b8d68da5690e5.png
remove /home/web/media/images/entries/6c6f0489b7973b07f2a5ae0e65509e20042150e7.png
remove /home/web/media/images/entries/analysis_screenshot.png
remove /home/web/media/images/entries/4990f1ad0b2b02651c7d9637ca6943a41940d4a8.png
remove /home/web/media/images/entries/30732ec2d0917ba0424e2fe47d3484e55405b034.jpg
remove /home/web/media/images/entries/acb764c1bbd87692e12cc1e930ade18dd4b163ab.jpg
remove /home/web/media/images/entries/171472ee0417f5b5cc52523e5ec1bae44c2ffbc8.png
remove /home/web/media/images/entries/0faaa4a6debcf15c894230be45a04fb705bceeba.png
remove /home/web/media/images/entries/97450255-ece81e80-1908-11eb-98bd-5b504587409b.png
remove /home/web/media/images/entries/49dfce2287cdac359c4d42f9d7c2c2ba065ba68d.png
remove /home/web/media/images/entries/125516c66e82c728ace21e0d46db978826878de9bce1b057e40fa0c5710b76236455f26b7191a379eb0c2f58415f49be5d4a1f06a3a3dc78e2a436628f545aef85650920923c44a9ed824aed01ba26df48d1b2b99850d2aa6c7bb3d4d216744b470a83ed5c3daa984ecb51f44fe54c53a51b3564f43b.png
remove /home/web/media/images/entries/7fca4773f1d70e1d69b3b510b2b445b7f92875a5.gif
remove /home/web/media/images/entries/1311a20fa5396b3b35d26a6a83f2cf2dc30665db.png
remove /home/web/media/images/entries/ccda82a22c1a94b378e21774b5e7214b4e0a9e7e.png
remove /home/web/media/images/entries/99641223-89bb5900-2a7c-11eb-9a3d-3eaa64b2587e.gif
remove /home/web/media/images/entries/c747613ad1e4b620569712a85253b85adf65f2d5.png
remove /home/web/media/images/entries/104142723-78e9ec80-5408-11eb-89dd-5f09e432c977.gif
remove /home/web/media/images/entries/1fb5001eaba4800443d74c86c113c26dc06f065b.png
remove /home/web/media/images/entries/21131cc49f307a2bb1b5c131c1f1e590f5ff60d6.png
remove /home/web/media/images/entries/93689288-bb905d80-fad5-11ea-802b-d6b122caa207.gif
remove /home/web/media/images/entries/106376220-bddcbf80-63c5-11eb-8df2-178b41de2465.png
remove /home/web/media/images/entries/4adb8e9f790fe4ea54f4bc3cf564bb2818f3a912.png
remove /home/web/media/images/entries/100411587-f1495800-30bd-11eb-99a3-a8b265a7eb42.png
remove /home/web/media/images/entries/f031d6b2c755148f2a62ea5dcdcbd84d1aa8a037.png
remove /home/web/media/images/entries/416af0a624c3d4f65aedacb8be870d88606776e8.png
remove /home/web/media/images/entries/102179886-ab7cf400-3ef3-11eb-8026-eed96f436564.png
remove /home/web/media/images/entries/97008125-1b51ac80-154b-11eb-9346-64bcb0691a72.gif
remove /home/web/media/images/entries/9c390587ac6562cb60e8127b42fec4f5fb08d5d8.png
remove /home/web/media/images/entries/4e2ce6f51c0cd94286973acd434c607b7a0bdfad.png
remove /home/web/media/images/entries/ca296f32e493cbc260c4e72c5533312458e14a43.png
remove /home/web/media/images/entries/b7999e3192a7d8f30bbc153f8976c1c64fd50d1b.png
remove /home/web/media/images/entries/f58b1236027083b3355ab9b97aed62100cead8dd.png
remove /home/web/media/images/entries/223f0f9ed72afcd10ebc3830329786e6ea9b0b42.png
remove /home/web/media/images/entries/70955568-bb939680-2047-11ea-9857-8aba122e43dd.png
remove /home/web/media/images/entries/91553919-1ba44180-e926-11ea-9459-01c9b9944929.gif
remove /home/web/media/images/entries/103337490-4ca8a480-4ac7-11eb-83b0-d4d6cb42a193.png
remove /home/web/media/images/entries/ecde3d42f00c0b32ff78d5e01a7f8d756df0c962.png
remove /home/web/media/images/entries/345b1105fe759843c348a5e81a33b9ef7b6a0c88.png
remove /home/web/media/images/entries/d05c2947ae727b2590bb446e7783c8d06d6b43b8.png
remove /home/web/media/images/entries/eaedb6d5a5509dfcf2719e6831ab44381f6a377c.png
remove /home/web/media/images/entries/7d305333bb660e97c9bf6ae9c40b5246d657fde9.jpg
remove /home/web/media/images/entries/9abbcd388c9df982137a545d749e4b9b26bec6df.png
remove /home/web/media/images/entries/8e2c6bce-0310-11e7-9f14-c41459b55977.png
remove /home/web/media/images/entries/4a1ee4c68968a290867df7b90150099a7e515b1d.png
remove /home/web/media/images/entries/998d4c1a6c1f658773c4d1928e41e3795b6e697d.png
remove /home/web/media/images/entries/ff16c4a5357725d544714a951812ee5cdb8c2c8e.png
remove /home/web/media/images/entries/88873546-353b6600-d260-11ea-97a3-94a5ff679ace.png
remove /home/web/media/images/entries/103901880-0623fd00-50fa-11eb-9fc8-f967589619ab.png
remove /home/web/media/images/entries/47deb947379f3c59c00e5ec30a42a330b78a925b.gif
remove /home/web/media/images/entries/fc44d462f486241e73ccd677544c26153245d552.gif
remove /home/web/media/images/entries/94837047-071b0380-0414-11eb-8af7-e067d6622005.gif
remove /home/web/media/images/entries/2044f6bfd74dfb13b62797e557d444ced6a84106.png
remove /home/web/media/images/entries/cbcf4ae75de46044686db0575cab96668266f7b0.png
remove /home/web/media/images/entries/c8c77ca9778a5760ba12d48be25a9886344dec12.png
remove /home/web/media/images/entries/95669631-e0b24200-0b50-11eb-9efe-2c227def9190.gif
remove /home/web/media/images/entries/1ae50b0190889e02f401adb09462f5070f493791.png
remove /home/web/media/images/entries/b8b2da2764613e8111ef436745d88649fa2c82ac.png
remove /home/web/media/images/entries/6d2411cdbe34e17275f32f8534fae718e1b09133.png
remove /home/web/media/images/entries/8e96a4816f78964f56b830353cfc11ec3eb35b30.gif
remove /home/web/media/images/entries/a04ddb70-0320-11e7-85ec-a42264a9df55.png
remove /home/web/media/images/entries/46f5ac2a3f73540355a3d2c4b5daa00e317aaa84.png
remove /home/web/media/images/entries/526ca6dece400d087c00b4faec8849c3cfd47c55.png
remove /home/web/media/images/entries/96177860-ce5c4d80-0f2e-11eb-80d5-c162251e51cb.png
remove /home/web/media/images/entries/1eb3b5988f92bae108bac32bacb80c01d28700d2.png
remove /home/web/media/images/entries/35378b0f775c235fb717ea9b0842872141149ddf.png
remove /home/web/media/images/entries/31e185bb98dd6540b145ee3c38d31562f6b51992.png
remove /home/web/media/images/entries/100169052-ecf02580-2e98-11eb-9194-80b39eab8ecc.gif
remove /home/web/media/images/entries/0ca13d7004538ee21428a405a101dcfea00ae77f.png
remove /home/web/media/images/entries/f3a40e932f5d0b40b3c408d7e9e0621fadc8152f.png
remove /home/web/media/images/entries/28bcbe6fbcc94d4db7e8b45c54b4be3f6f7ee059.png
remove /home/web/media/images/entries/351d3ec8e8d9c4e61572f5e819e86e2ca2d64282.png
remove /home/web/media/images/entries/104394821-1a9d4500-5593-11eb-9571-f33f86c51393.png
remove /home/web/media/images/entries/14a8d48dffe68f84865ba1274848da959f6c2795.png
remove /home/web/media/images/entries/97025281-23641900-1558-11eb-8d1b-2666e835526f.gif
remove /home/web/media/images/entries/d89fdd502bdd01b648a848099002027343d0bf32.png
remove /home/web/media/images/entries/8f3ab760aeffd5247ca8f83480cad9574702a006.png
remove /home/web/media/images/entries/93477109-e07ca900-f8fa-11ea-9fba-4e087680c456.png
remove /home/web/media/images/entries/6569a36bfd2311fa94c075dcbb13cd4e1dadcc03.png
remove /home/web/media/images/entries/125516c66e82c728ace21e0d46db978826878de9bce1b057e40fa0c5710b76236455f26b7191a379eb0c2f58415f49be5d4a1f06a3a3dc78e2a436628f545aef85650920923c44a9ed824aed01ba26df48d1b2b99850d2aa6c7bb3d4d216744b470a83ed5c3daa984ecb51f44fe54c53a51b3564f43b-1.png
remove /home/web/media/images/entries/17dadb81e6da2cd9d47c96b144252f7d8ffd3f97.jpg
remove /home/web/media/images/entries/bc33eb0c5d9888afed75355f91d59785f683668b.png
remove /home/web/media/images/entries/621c1597548a779cc31a7bd75b5e105ad642ed3a.png
remove /home/web/media/images/entries/72783a534369119ed6afb7e97e2380859ddf5f47.PNG
remove /home/web/media/images/entries/33ff51ac3da6656cc348d627d2e2ceb06e228c0e.png
remove /home/web/media/images/entries/702086c61732fcda41a41f63fdba8228ab0bc874.png
remove /home/web/media/images/entries/78421830-1f73b680-765b-11ea-8e65-6c2040ad24f2.gif
remove /home/web/media/images/entries/62404446680fe6b23602c6529b6d21c7b493989c.png
remove /home/web/media/images/entries/b47a953013f4a558c0dd4c4d2f95ccb555d6c9b2.png
remove /home/web/media/images/entries/8423cdfe23ba25a4f3135e7ebe79b5fa1bbfad44.png
remove /home/web/media/images/entries/screencapture.gif
remove /home/web/media/images/entries/ac28fd0ac42c38a5468816baf0a4d7f73682b1b5.png
remove /home/web/media/images/entries/70bf0f31dbf0a587893bc66701a52b42cc7a68f1.gif
remove /home/web/media/images/entries/cba6b7238502ab031417e687660b6d6a5ac8924f.png
remove /home/web/media/images/entries/77519071-6fab8580-6eb1-11ea-995d-e961e70d6c9c.gif
remove /home/web/media/images/entries/c32fd8a0e6caef9d0f9beb9eb8da492c4807b3f7.png
remove /home/web/media/images/entries/a1cb21ed7bfbea4642a038ec252634ea554641d2.png
remove /home/web/media/images/entries/41651e44-fd0c-11e6-8cf1-42a36b5031e4.png
remove /home/web/media/images/entries/dfac8c8f62f898f1185ffdaa1ced207e561ab11d.jpg
remove /home/web/media/images/entries/a82bb84629e2b8a9efd56c10832d810b1bc01016.png
remove /home/web/media/images/entries/cd0d8046d0279c3f4cdb9fe841edbe96fe32a1a0.png
remove /home/web/media/images/entries/e851c8e9545d3da9da774f1f6dc9d6606ce60b83.jpg
remove /home/web/media/images/entries/47a4faecdcea5615c095959eb95cbf98eaabae37.jpg
remove /home/web/media/images/entries/56b61af9f844977ef54d8e5ae73030b99f922ef8.png
remove /home/web/media/images/entries/97995619-1dbecc80-1dbd-11eb-9776-49761757756d.png
remove /home/web/media/images/entries/oCzBa5z.jpg
remove /home/web/media/images/entries/28698948-dc69d81e-7370-11e7-8ca8-6ab47ae599b6.jpg
remove /home/web/media/images/entries/101234295-f1cc8a80-368b-11eb-9b52-8f42a4f994a2.gif
remove /home/web/media/images/entries/102452562-44437900-4086-11eb-9518-7b5cc10c1af1.gif
remove /home/web/media/images/entries/57681ed04d9ff4732eab2f120c14c8042137f069.png
remove /home/web/media/images/entries/f377e0d99dca3c900ea4fde88142e525f253179c.png
remove /home/web/media/images/entries/b228f9f5ac9591797ec906f2290cb289f2a7e9c8.png
remove /home/web/media/images/entries/0195d460270fd920ab169d50a021c952acafc073.png
remove /home/web/media/images/entries/4d79b8cc381025ea5a876e44ac7705da52882dd2.png
remove /home/web/media/images/entries/32661829-a63ee328-c628-11e7-90a7-b4c7bb64ddf4.png
remove /home/web/media/images/entries/9c36b071f9173a534ce942eef9886485e3fe277d.png
remove /home/web/media/images/entries/defc013c55568723f004557cafb7d60cb85600f6.png
remove /home/web/media/images/entries/f7dc6b92ee26072f6e03fe46dbbdc0ac69293d3b.png
remove /home/web/media/images/entries/103264118-bb610180-49e4-11eb-9a79-1ec6d835b720.png
remove /home/web/media/images/entries/f60b3c7e7c8e34e8a043ce4a9642b73b43a50f0c.png
remove /home/web/media/images/entries/102572260-4f0a1680-4137-11eb-9ee1-7645fd0e322c.gif
remove /home/web/media/images/entries/23c883de86c5c060747f2d3c71f7fd27059c725f.png
remove /home/web/media/images/entries/f49b5b9172b18edce195ccc33b164bc9c8fe9b71.png
remove /home/web/media/images/entries/100062010-a8ee2800-2e7a-11eb-926c-ba1ed37ff81d.gif
remove /home/web/media/images/entries/977c6d0b5b6b936a4d8c1b642da80faf0a2cec87.jpg
remove /home/web/media/images/entries/b3d9d69482559f4374180f3455653b339810063d.png
remove /home/web/media/images/entries/1f99406b5bc6308320bc78c3e8dd574fe88bf1d5.png
remove /home/web/media/images/entries/7a77087933410814f5b8d23c76ff5bf683d8ff0a.png
remove /home/web/media/images/entries/acfec97701d6ce019b6416aa6286251ec6650ca7.png
remove /home/web/media/images/entries/75894983-49a43f80-5e35-11ea-95a8-a86276b39bbc.gif
remove /home/web/media/images/entries/101738232-683c1300-3af8-11eb-8135-300b98259477.gif
remove /home/web/media/images/entries/88605205-9de9dd80-d0bc-11ea-9b5f-756532cafe0d.png
remove /home/web/media/images/entries/c037635238b172973d7579d29fc06f35a6953799.png
remove /home/web/media/images/entries/8796d7046e8894f74b3a09c013ccc93293c886bf.png
remove /home/web/media/images/entries/3ebf80ab462e299a3e7ec9a878ac82a0b875aa70.png
remove /home/web/media/images/entries/8832a4b898eadd1411ed87c84eda1fb9bc746c29.png
remove /home/web/media/images/entries/97382837-ab248d00-18a2-11eb-92e9-3900b6e82f69.gif
remove /home/web/media/images/entries/100296584-59257300-2fd8-11eb-85a7-5cc44bfa9b8e.gif
remove /home/web/media/images/entries/a4903f3b06ba9f08fb968fba4f086b254f3a28ca.png
remove /home/web/media/images/entries/7e41fcc601ced4e2315cced36e850bcca3727d36.jpg
All unused Entry images have been removed successfully.
imageswsgi-79bfd5db5d-x9mbf:/home/web/django_project# ./manage.py remove_unused_i
environ({'DJANGO_SETTINGS_MODULE': 'core.settings.override_settings', 'LANG': 'C.UTF-8', 'HOSTNAME': 'uwsgi-79bfd5db5d-x9mbf', 'DEBUG': 'False', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'KUBERNETES_PORT_443_TCP_ADDR': '10.43.0.1', 'VIRTUAL_PORT': '8080', 'KUBERNETES_PORT': 'tcp://10.43.0.1:443', 'PWD': '/home/web/django_project', 'HOME': '/root', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'DEBIAN_FRONTEND': 'noninteractive', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'CRYPTOGRAPHY_DONT_BUILD_RUST': '1', 'KUBERNETES_PORT_443_TCP': 'tcp://10.43.0.1:443', 'DATABASE_NAME': 'gis', 'TERM': 'xterm-256color', 'DATABASE_USERNAME': 'docker', 'PYTHON_VERSION': '3.7.2', 'SHLVL': '1', 'KUBERNETES_SERVICE_PORT': '443', 'VIRTUAL_HOST': 'projecta.kartoza.com', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'DATABASE_HOST': 'db', 'KUBERNETES_SERVICE_HOST': '10.43.0.1', 'DATABASE_PASSWORD': 'docker', 'PYTHON_PIP_VERSION': '18.1', '_': './manage.py'})
environ({'DJANGO_SETTINGS_MODULE': 'core.settings.override_settings', 'LANG': 'C.UTF-8', 'HOSTNAME': 'uwsgi-79bfd5db5d-x9mbf', 'DEBUG': 'False', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'KUBERNETES_PORT_443_TCP_ADDR': '10.43.0.1', 'VIRTUAL_PORT': '8080', 'KUBERNETES_PORT': 'tcp://10.43.0.1:443', 'PWD': '/home/web/django_project', 'HOME': '/root', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'DEBIAN_FRONTEND': 'noninteractive', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'CRYPTOGRAPHY_DONT_BUILD_RUST': '1', 'KUBERNETES_PORT_443_TCP': 'tcp://10.43.0.1:443', 'DATABASE_NAME': 'gis', 'TERM': 'xterm-256color', 'DATABASE_USERNAME': 'docker', 'PYTHON_VERSION': '3.7.2', 'SHLVL': '1', 'KUBERNETES_SERVICE_PORT': '443', 'VIRTUAL_HOST': 'projecta.kartoza.com', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'DATABASE_HOST': 'db', 'KUBERNETES_SERVICE_HOST': '10.43.0.1', 'DATABASE_PASSWORD': 'docker', 'PYTHON_PIP_VERSION': '18.1', '_': './manage.py'})
DEBUG 2021-03-01 10:18:22,559 base 273 140523414951680 Configuring Raven for host: <raven.conf.remote.RemoteConfig object at 0x7fce061588d0>
-------------------------------------------------------------------------------
GitHub images: 31 files, ImageField images: 867 files, and All media images: 779 files.
GitHub images: 13.28 MB, ImageField images: 354.6 MB, All media images: 351.87 MB.
Do you want to delete unused Entry images 0 files, 0.0 MB? [Y/n] n
remove files aborted!
test on staging.
root@uwsgi-7fdf9f4694-c6xpf:/home/web/media# df -lah
...
/dev/longhorn/pvc-... 3.9G 2.4G 1.6G 60% /home/web/media
...
===============================================================================
Entry's Media
------------------------------
GitHub images: 31 files, ImageField images: 864 files, and All media images: 779 files.
GitHub images: 13.28 MB, ImageField images: 354.6 MB, All media images: 351.87 MB.
All Media (exclude Entry model instance)
------------------------------
ImageField and FileField: 589 files, All files in the related folder: 823 files.
ImageField and FileField: 409.27 MB, All files in the related folder: 917.45 MB.
Delete unused media images and files: 269 files, 330.08 MB? [Y] y
...
remove /home/web/media/images/lesson/worksheet/external_data/8ef254b8f60af0058a98ce7bf1d67f95b29bc77c.zip
remove /home/web/media/images/lesson/worksheet_question/question_image/3e619af18871da95d0478e268d266cd5bec95728.png
All unused Entry images have been removed successfully.
root@uwsgi-7c7984b6df-4q5rx:/home/web/media# df -lh
...
/dev/longhorn/pvc-... 3.9G 2.0G 2.0G 51% /home/web/media
...
This PR refers to #1319.
For now, this only delete unused image related to Entry model instance.