Add a success indication
All checks were successful
docker-image / docker (push) Successful in 3m20s
All checks were successful
docker-image / docker (push) Successful in 3m20s
Also document the command.
This commit is contained in:
parent
1fc917bdf5
commit
5fc42907e3
|
@ -72,9 +72,10 @@ Without it, the expiry action will be taken.
|
||||||
Command is one of:
|
Command is one of:
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|------------------------------------------------------------------------------------------------------------|
|
|------------|------------------------------------------------------------------------------------------------------------|
|
||||||
| check | Print a list of revisions and notes that would be expired, based on the given parameters for `-n` and `-r` |
|
| check | Print a list of revisions and notes that would be expired, based on the given parameters for `-n` and `-r` |
|
||||||
| cron | Run `expire` at 2 am local time each day. Will run until killed. |
|
| cron | Run `expire` at 2 am local time each day. Will run until killed. |
|
||||||
|
| emailcheck | Send a test email from the configured sender to themselves. |
|
||||||
| expire | Expire old revisions and notes. |
|
| expire | Expire old revisions and notes. |
|
||||||
|
|
||||||
### Environment variables
|
### Environment variables
|
||||||
|
|
|
@ -69,6 +69,7 @@ class EmailSender:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'Unable to send mail through {self}: {e}')
|
print(f'Unable to send mail through {self}: {e}')
|
||||||
raise e
|
raise e
|
||||||
|
print(f'Test email to {self.mail_from} sent successfully.')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'EmailSender<{self.hostname},{self.port},{self.username},{self.mail_from}>'
|
return f'EmailSender<{self.hostname},{self.port},{self.username},{self.mail_from}>'
|
||||||
|
@ -291,6 +292,7 @@ def main():
|
||||||
command is one of:
|
command is one of:
|
||||||
- check: print a list of revisions and notes to be expired
|
- check: print a list of revisions and notes to be expired
|
||||||
- cron: run expire every 24 hours
|
- cron: run expire every 24 hours
|
||||||
|
- emailcheck: send a test email from the configured sender to themselves
|
||||||
- expire: expire old revisions and untouched notes
|
- expire: expire old revisions and untouched notes
|
||||||
|
|
||||||
See https://git.hamburg.ccc.de/CCCHH/hedgedoc-expire
|
See https://git.hamburg.ccc.de/CCCHH/hedgedoc-expire
|
||||||
|
|
Loading…
Reference in a new issue