8000 /health api and telegram commands to return last processing time by xataxxx · Pull Request #6294 · freqtrade/freqtrade · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

/health api and telegram commands to return last processing time #6294

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

Merged
merged 7 commits into from
Feb 2, 2022

Conversation

xataxxx
Copy link
Contributor
@xataxxx xataxxx commented Jan 24, 2022

Summary

Add ability to see the last process timestamp, meaning when was the last time freqtradebot internal process method finished.

Solve the issue: #6009

Quick changelog

  • Added API / RPC endpoint that returns JSON {'last_process':'1970-01-01 00:00:00'}
  • Added Telegram /health command

What's new?

Ability to see last process timestamp.
We return 1970-01-01 00:00:00 by default until the first process cycle begins.

@xmatthias xmatthias added Enhancement Enhancements to the bot. Get lower priority than bugs by default. RPC Telegram, ReST API, external control, ... labels Jan 24, 2022
@xmatthias xmatthias linked an issue Jan 24, 2022 that may be closed by this pull request
@coveralls
Copy link
coveralls commented Jan 24, 2022

Coverage Status

Coverage decreased (-0.05%) to 97.932% when pulling 15d5389 on xataxxx:health into e062188 on freqtrade:develop.

last_p = self._freqtrade.last_process
return {
'last_process': str(last_p),
'last_process_loc': last_p.astimezone(tzlocal()).strftime(DATETIME_PRINT_FORMAT),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now made some changes to this ...
especially this part can be argued ... this will move the timestamp to "local time" (in server timezone) ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, been buzy with life/work, I can sort this out in the weekend though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed "something" already (i'm sometimes faster fixing stuff than commenting "please fix" 😆 )

... this is more a "do we want it this way" question

Copy link
Member
@xmatthias xmatthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

We'll try this with "current timezone" for telegram - we'll see if this will raise questions ...

@xmatthias xmatthias merged commit a733a74 into freqtrade:develop Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. RPC Telegram, ReST API, external control, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HealthCheck API endpoint
3 participants
0