feat: use notifiers on schedule (#362)

* fix potential memory leak with time.After

* add new background service to manage scheduled notifications

* update docs

* remove old js reference

* closes #278

* tidy
This commit is contained in:
Hayden 2023-03-21 11:32:48 -08:00 committed by GitHub
parent 975e636fb6
commit 840d220d4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 201 additions and 52 deletions

View file

@ -35,7 +35,7 @@ Homebox is currently in early-active development and is currently in **beta** st
- Item Identifications (Serial, Model, etc)
- Categorized Attachments (Images, Manuals, General)
- Arbitrary/Custom Fields
- Csv Import for quickly creating and managing items
- CSV Import/Export for quickly creating and managing items
- Custom Reporting
- Bill of Materials Export
- QR Code Label Generator

View file

@ -5,10 +5,13 @@
Great for testing out the application, but not recommended for stable use. Checkout the docker-compose for the recommended deployment.
```sh
docker run --name=homebox \
--restart=always \
--publish=3100:7745 \
ghcr.io/hay-kot/homebox:latest
docker run -d \
--name homebox \
--restart unless-stopped \
--publish 3100:7745 \
--env TZ=Europe/Bucharest \
--volume /path/to/data/folder/:/data \
ghcr.io/hay-kot/homebox:latest
```
## Docker-Compose

View file

@ -41,8 +41,18 @@ Homebox has a built-in QR code generator that can be used to generate QR codes f
However, the API endpoint is available for generating QR codes on the fly for any item (or any other data) if you provide a valid API key in the query parameters. An example url would look like `/api/v1/qrcode?data=https://homebox.fly.dev/item/{uuid}&access_token={api_key}`. Currently the easiest way to get an API token is to use one from an existing URL of the QR Code in the API key, but this will be improved in the future.
:octicons-tag-24: 0.8.0
:octicons-tag-24: v0.8.0
In version 0.8.0 We've added a custom label generation. On the tools page, there is now a link to the label-generator page where you can generate labels based on Asset ID for your inventory. These are still in early development, so please provide feedback. There's also more information on the implementation on the label generator page.
[Demo](https://homebox.fly.dev/reports/label-generator)
[Demo](https://homebox.fly.dev/reports/label-generator)
## Scheduled Maintenance Notifications
:octicons-tag-24: v0.9.0
Homebox uses [shoutrrr](https://containrrr.dev/shoutrrr/0.7/) to send notifications. This allows you to send notifications to a variety of services. On your profile page, you can add notification URLs to your profile which will be used to send notifications when a maintenance event is scheduled.
**Notifications are sent on the day the maintenance is scheduled at or around 8am.**
As of `v0.9.0` we have limited support for complex scheduling of maintenance events. If you have requests for extended functionality, please open an issue on GitHub or reach out on Discord. We're still gauging the demand for this feature.