Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
FediMeteo
@admin@fedimeteo.com  ·  activity timestamp 3 days ago
Under the hood update!

I’ve finally retired the old cron + sh setup for the weather bots. It served us well, but it had a major flaw: if I rebooted the server while it was posting, the job just died halfway. If the server was down during a scheduled slot, the forecast was lost forever.

So, I wrote a custom Python daemon to run inside the FreeBSD Jails.

  • It’s stateful now. If a crash happens at city 15 of 50, it resumes exactly there on reboot.
  • If the server naps/is rebooting during a scheduled run, the bot realizes it missed a slot and runs immediately upon waking up.
#FediMeteo #SysAdmin #Python #FreeBSD #Coding #SelfHosted #OwnYourData #StayTuned
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.8 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login