YoloSwagTeam / t2m

Twitter to Mastodon timeline forwarding tool
GNU General Public License v3.0
76 stars 15 forks source link

Mastodon server downtime resulting in many duplicated t2m posts #21

Open ryanfb opened 6 years ago

ryanfb commented 6 years ago

Not sure if this is an issue with t2m or the state the server was in, but the Mastodon instance I use went down for most of yesterday, and when it came back up I had over 1,000 duplicated posts from t2m:

yz-uz2n6 6kaeuc9z

The duplicated tweets only show up as "forwarded" once in my cron logs from t2m:

66kbbk-4

I'm currently running a script to delete all the duplicates, but it would be great to know I'm not going to need to shut off t2m every time there's server downtime.

Psycojoker commented 6 years ago

Hello,

Did you get any error message when the instance was down? I'm looking at the code and the only thing I'm seeing as a possible failure is that the toot managed to get sent by there is a error somewhere during that process and t2m consider it to not being correctly forwarded.

Relevat part of the code https://github.com/YoloSwagTeam/t2m/blob/master/t2m/__init__.py#L311-L319

ryanfb commented 6 years ago

It looks like there was likely STDERR output from t2m, but it wound up being lost because I neglected to redirect STDERR to my log file, and the machine it's running on didn't have an MTA configured for cron to mail to (I see a lot of (CRON) info (No MTA installed, discarding output) in the cron logs themselves for the time period where the mastodon server was down, but not elsewhere). I've changed my script to redirect STDERR as well so at least I'll be able to check the error if it happens again.

Psycojoker commented 6 years ago

Cool, thx :)

Don't hesitate to update if you get any error next time please! (and same for other bugs if it's possible)