Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Make "StartMessage" optional #1332

Closed
creffect opened this issue Dec 10, 2024 · 5 comments
Closed

Improvement: Make "StartMessage" optional #1332

creffect opened this issue Dec 10, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@creffect
Copy link

Describe the bug
We use Monika as a cron job command (monika -r 1 --status-notification false), because our hoster doesn't support background services using nodejs. It works perfectly, but each time monika is run, it triggers the start message (Monika is running).

We have disabled this in the file @hyperjumptech/monika/lib/commands/monica.js

> (0, start_message_1.sendMonikaStartMessage)(notifications).catch((error) => pino_1.log.error(error.message));

but of cause it would be nicer, to have an cli option to disable the startup message.

To Reproduce
Start monika, and you will get always a start message.

Expected behavior
It would be great to disable startup messages optionally.

Thank you for work great work! :)

@sapiderman sapiderman self-assigned this Dec 13, 2024
@sapiderman
Copy link
Contributor

@creffect, thanks for the feedback. Will look into it.

@sapiderman
Copy link
Contributor

Hi, @creffect you can check the PR here and give feedback.

@creffect
Copy link
Author

creffect commented Jan 20, 2025

@sapiderman Thank you for your pull request.

There seems to be a miscommunication, because i didn't mean the log (logRunningInfo) but the sendMonikaStartMessage.

Maybe both makes sense, but the sendMonikaStartMessage is the important part for me, because each time I get a push message.

So

if (flags['skip-start-message'] === false) {
        sendMonikaStartMessage(notifications).catch((error) =>
          log.error(error.message)
        )
}

would probably solve this. Thank you very much!

@sapiderman
Copy link
Contributor

Updated. Now the startup notifications is also disabled when the switch is used.

@haricnugraha haricnugraha added the enhancement New feature or request label Jan 24, 2025
@sapiderman
Copy link
Contributor

merged here #1342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants