-
Notifications
You must be signed in to change notification settings - Fork 3
Bot Configuration
Bot is a set of python scripts that takes care of routine server tasks and communicate to admin through email. All settings can be configured at /admin/bot/.
It sends reminders to corresponding recipients for the following lab duty based from Duty Spreadsheet:
- Quarterly: Lab outings, and Slack / GitHub maintenance.
- Monthly: Birthday wishes, AWS maintenance, and website content maintenance.
- Weekly: Breakfast, meeting schedule updates, Microphone setup for Eterna Special, News posting for Eterna Special.
It sends Group Meeting Reminder to #general.
It sends individual reminders to presenters for:
- Upcoming Journal Club: announce paper of choice.
Upcoming Eterna Special: announce title for posting.- Upcoming Rotation Student presentation: send slides to admin.
It sends reminders or messages to admin for:
- Status of system jobs: backup, gdrive, report, and versions.
- Upcoming Journal Club,
Eterna Special, Rotation Student presentation: add to database. - Error traceback.
It sends individual wishes on everyone's birthday.
The server caches analytics data from AWS CloudWatch, Google Analytics, GitHub repositories, Slack and Dropbox activities. This is to reduce loading time for pages like /group/aws/.
Caching has 3 intervals:
- Every 3 mintues: Slack presence, including last_seen timestamp. Used in group home page /group/.
- Every 15 minutes: AWS CloudWatch and Google Analytics.
- Every 30 minutes: GitHub, Slack, Dropbox, Schedule Spreadsheet, Duty Spreadsheet and Group Calendar.
Caching runs as cron jobs.
The server handles backup weekly. Settings can be configured at /admin/backup/.
Every week, it runs:
- Zip up static files, MySQL, Apache, and local
config/
files. - Upload most recent backup onto
daslab
Google Drive. - Clean up obsolete backup files in Google Drive.
Server reports to admin for any runtime error it encounters, either through email or Slack. If IS_SLACK is enabled, all messages can be found at /admin/src/slackmessage/. Messages that are older than 15 days are removed weekly.
Important error messages are:
- Flash Slides setup failure. Must be fixed right away.
- Duty or birthday message error.
Some messages could be ignored:
- Cache failures that are due to vendor unavailability (e.g. 502 or 503 response, HTTP timeout; mostly seen from GitHub and Slack). If it fails reproducibly, you may need to investigate so that the caching results will be up-to-date.
- Success notes about backup, etc. tasks.
New Admin Setup
Admin Responsibility
Server Environment
Overview
Linux
Python