User Tools

Site Tools


infra:services:hula

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infra:services:hula [2025/12/28 12:44] atluxity_idp.hackeriet.noinfra:services:hula [2026/02/03 09:29] (current) atluxity_idp.hackeriet.no
Line 9: Line 9:
  
 Go to the checkout as `hackerhula` via `root` Go to the checkout as `hackerhula` via `root`
-<code bash>+<code>
 sudo su - sudo su -
 su - hackerietweb -s /bin/bash su - hackerietweb -s /bin/bash
Line 17: Line 17:
  
 If you've made migrations, run this If you've made migrations, run this
-<code bash>+<code>
 poetry run ./manage.py migrate poetry run ./manage.py migrate
 </code> </code>
  
 If you've changed static files, run this If you've changed static files, run this
-<code bash>poetry run ./manage.py collectstatic</code>+<code>poetry run ./manage.py collectstatic</code>
  
 Back to root we go Back to root we go
-<code bash>^D</code>+<code>^D</code>
  
 Restart the appserver Restart the appserver
-<code bash>systemctl restart gunicorn-hula.service</code>+<code>systemctl restart gunicorn-hula.service</code>
 and bob's your uncle and bob's your uncle
  
Line 78: Line 78:
  
 === How to perform an API export to JSON file for sync of payment status === === How to perform an API export to JSON file for sync of payment status ===
-<code bash>+ 
 +See also https://github.com/hackeriet/fiken-hula 
 + 
 +<code>
 atluxity@hostname: git$ gh repo clone hackeriet/fiken-hula atluxity@hostname: git$ gh repo clone hackeriet/fiken-hula
 atluxity@hostname: git$ cd fiken-hula/ atluxity@hostname: git$ cd fiken-hula/
Line 87: Line 90:
 </code> </code>
  
-You now have a json file! Next step is possible.+You now have a json file! Next step is possible. TAKE CARE, there is currently too much PII in the file. Do not leave it unattented.
  
 === How to Import to Hula DB via manual script === === How to Import to Hula DB via manual script ===
  
-<code bash>+See also https://github.com/hackeriet/hackerhula/blob/master/hackerhula/member/management/commands/sync_fiken.py 
 + 
 +<code>
 atluxity@blade:~$ sudo su - hackerietweb -s /bin/bash atluxity@blade:~$ sudo su - hackerietweb -s /bin/bash
 hackerietweb@blade:~$ cd /srv/webapp-hackerhula/new/hackerhula/ hackerietweb@blade:~$ cd /srv/webapp-hackerhula/new/hackerhula/
 hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ poetry shell hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ poetry shell
-(hackerhula-py3.11) root@blade:/srv/webapp-hackerhula/new/hackerhulapython3 manage.py sync_fiken /home/atluxity/2025-12-27-fiken-sales.json                                           +(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhulapython3 manage.py sync_fiken /home/atluxity/2025-12-27-fiken-sales.json 
 +(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ exit                                     
 +atluxity@blade:~$ rf 2025-12-27-fiken-sales.json 
 +</code> 
 + 
 +TAKE CARE, the json file has too much PII etc, do not leave it unattended. 
 + 
 +=== Reporting on payments stored in Hula === 
 +To sanity check, or whatever, a small stats command was created to be run in the same way as the sync command above. 
 +<code> 
 +(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ python3 manage.py payments_stats -h 
 +usage: manage.py payments_stats [-h] [--from DATE_FROM] [--to DATE_TO] [--last-months LAST_MONTHS] [--last-1-months] [--last-3-months] [--last-6-months] [--last-12-months] 
 +                                [--format {text,json}] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] 
 +                                [--skip-checks] 
 + 
 +Report payment statistics from the database 
 + 
 +options: 
 +  -h, --help            show this help message and exit 
 +  --from DATE_FROM      Start date (YYYY-MM-DD) 
 +  --to DATE_TO          End date (YYYY-MM-DD) 
 +  --last-months LAST_MONTHS 
 +                        Last N months (e.g. --last-months 3) 
 +  --last-1-months       Preset for last 1 month 
 +  --last-3-months       Preset for last 3 months 
 +  --last-6-months       Preset for last 6 months 
 +  --last-12-months      Preset for last 12 months 
 +  --format {text,json}  Output format (default: text) 
 +  --version             Show program's version number and exit. 
 +  -v {0,1,2,3}, --verbosity {0,1,2,3} 
 +                        Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output 
 +  --settings SETTINGS   The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. 
 +  --pythonpath PYTHONPATH 
 +                        A directory to add to the Python path, e.g. "/home/djangoprojects/myproject"
 +  --traceback           Raise on CommandError exceptions. 
 +  --no-color            Don't colorize the command output. 
 +  --force-color         Force colorization of the command output. 
 +  --skip-checks         Skip system checks.
 </code> </code>
/srv/hackeriet-wiki/dokuwiki/data/attic/infra/services/hula.1766925850.txt.gz · Last modified: by atluxity_idp.hackeriet.no