A-c0rN / ASMARA

Automated System for Monitoring And Relaying Alerts
https://eas.missingtextures.net
Open Data Commons Open Database License v1.0
9 stars 8 forks source link

ASMARA says recently issued alert is very expired #37

Closed miceoroni closed 4 days ago

miceoroni commented 4 months ago

whenever any alert gets passed through the script, it says the alert is very expired. could anyone look into this and provide a solution? thanks! here is a log file to what I'm experiencing: logthing.txt

reggietorres commented 4 months ago

Your alert needs to be from today's date, it won't send it if the alert has passed its expire time @miceoroni unless there's a bug that we have not discovered, your issue is that the alert you have sent has already passed the expire time of 1 hour

Edit: incorrect info disregard

secludedhusky commented 3 months ago

Due to it being a leap year, the program isn't able to calculate the "Very Expired" as well as "Too Early" values for some reason.

This is a genuine issue and it is an issue with the way the program calculates the time and date.

reggietorres commented 3 months ago

same here, i'm able to reproduce

[12:09:39E] > [DECODER] TRACELOG > startTime: 1709760960.0 [12:09:39E] > [DECODER] TRACELOG > endTime: 1709772660.0 [12:09:39E] > [DECODER] TRACELOG > now - S.T: -84381.0 [12:09:39E] > [DECODER] TRACELOG > now - E.T: -96081.0 [12:09:39E] > [DECODER] Monitor 1: Alert is Very Expired.

physprop commented 3 months ago

It doesn't help that those start/end timestamps are from the future.

Keep in mind that epoch does not include leap seconds.

@A-c0rN should take a look at this.

A-c0rN commented 3 months ago

The code is designed to throw out alerts if it's greater than ~5 hours in the future, assuming that the alert was sent over a year ago. This kinda failed because it assumed the alert was 1 day in advance. This isn't necessarily an issue with ASMARA, but the underlying libraries I use.

I'll look into workarounds, this issue has bit me in the ass too many times now lmao

ManMacho commented 3 months ago

Im having this issue too :/

ShowLowfinityHarvester commented 3 months ago

me three

ManMacho commented 3 months ago

@A-c0rN I have found a fix to this, I'd love to share it with you through discord or something, if needed.

reggietorres commented 3 months ago

@A-c0rN I have found a fix to this, I'd love to share it with you through discord or something, if needed.

If you have code, fork the project and send a pull request

If you don't but have an idea on how, write a three page essay on how (lol, just tell us how, include line numbers)

WhoIsAsking1996 commented 3 months ago

@A-c0rN I have found a fix to this, I'd love to share it with you through discord or something, if needed.

If you have code, fork the project and send a pull request

If you don't but have an idea on how, write a three page essay on how (lol, just tell us how, include line numbers)

I have an idea for a fix but it has a risk to it

WhoIsAsking1996 commented 2 months ago

still no fix :sob:

WhoIsAsking1996 commented 2 months ago

There is a hot fix on my github

A-c0rN commented 3 weeks ago

There is a hot fix on my github

Lol removing the code isn't a fix, it's covering up the underlying issue.

Sorry I haven't been available, It's that time of year. Just started getting back into the project, and there's gonna be a massive code refactor coming.

and this one will be fun :3

reggietorres commented 3 weeks ago

There is a hot fix on my github

Lol removing the code isn't a fix, it's covering up the underlying issue.

Yeah thats what I told him

physprop commented 5 days ago

I have this properly fixed in my personal repository. Made a pull request so we can merge it to the mainline.

reggietorres commented 5 days ago

I have this properly fixed in my personal repository. Made a pull request so we can merge it to the mainline.

Awesome, il take a look at it when I have time.