====== Hacker-hula ======
==== Maintenance =====
=== Updating the software ===
Go to the checkout as `hackerhula` via `root`
sudo su -
su - hackerietweb -s /bin/bash
cd /srv/webapp-hackerhula/new/hackerhula/
git pull
If you've made migrations, run this
poetry run ./manage.py migrate
If you've changed static files, run this
poetry run ./manage.py collectstatic
Back to root we go
^D
Restart the appserver
systemctl restart gunicorn-hula.service
and bob's your uncle
==== Payment status =====
As of 2025-12-28 there is a high likelyhood of mistakes or error in the data entering the payment status database. We currently have no good place to track these issues currently. TODO for styret
The current logical flow of data is
+----------------------+
| |
| Member bank account |
| |
+----------+-----------+
|
v
+------------------------+
| |
| Hackeriet bank account |
| (Cultura) |
| |
+-----------+------------+
|
v
+-------------------+
| |
| Accounting system |
| (Fiken) |
| |
+---------+---------+
|
v
+-------------------------+
| |
| API export to JSON file |
| |
+------------+------------+
|
v
+-------------------------------------+
| |
| Import to Hula DB via manual script |
| |
+-------------------------------------+
If there is a mistake in any point in the chain, it can look like payment is missing. Maybe the member has changed bank account since customer ID in accounting system was correlated to hula? Maybe finance officer has not done quality work in the accounting system? Maybe a manual sync of payment status has not been performed for a while, so recent payments are not showing yet?
=== How to perform an API export to JSON file for sync of payment status ===
See also https://github.com/hackeriet/fiken-hula
atluxity@hostname: git$ gh repo clone hackeriet/fiken-hula
atluxity@hostname: git$ cd fiken-hula/
atluxity@hostname: fiken-hula$ echo FIKEN_API=\"$(hackerpass fiken/api)\" > .env
atluxity@hostname: fiken-hula$ source env/bin/activate
(env) atluxity@hostname: fiken-hula$ pip install -r requirements.txt
(env) atluxity@hostname: fiken-hula$ python dump_all_sales.py > $(date +%Y-%d-%m)-all-sales.json
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 ===
See also https://github.com/hackeriet/hackerhula/blob/master/hackerhula/member/management/commands/sync_fiken.py
atluxity@blade:~$ sudo su - hackerietweb -s /bin/bash
hackerietweb@blade:~$ cd /srv/webapp-hackerhula/new/hackerhula/
hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ poetry shell
(hackerhula-py3.11) hackerietweb@blade:/srv/webapp-hackerhula/new/hackerhula$ python3 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
TAKE CARE, the json file has too much PII etc, do not leave it unattended.