Session log — Vimeo nightly sync for s2l.online courses
← All session logs
Session log — Vimeo nightly sync for s2l.online courses
Summary
Started as an explanation of the current manual Vimeo refresh workflow for s2l.online, then expanded into building and switching on a nightly automatic sync that mirrors how vodalibrary works, adapted to the s2l course-and-lesson shape.
Decisions
- Build a nightly sync, modelled on the vodalibrary 02:00 refresh.
- Run it at 02:15 SAST so it does not collide with the vodalibrary Vimeo pull.
- Map each course to its Vimeo tag in a small editable config file rather than store the tag in the database, since no existing column holds it.
- When a video is removed from Vimeo, the matching lesson is set to unpublished, not deleted, so nothing is lost permanently and Hasmukh can restore it from the admin.
- The user-visible lesson title is preserved on refresh because Hasmukh may have curated it. Only the cached Vimeo title, description, thumbnail and duration are refreshed.
- For the very first run, SARS English and Online Meetings were placed on a skip list because their Vimeo tag also points to a second set of older videos that would have come through as 11 unexpected new lessons. To be reviewed in a follow-up session.
Changes made
- New folder on the s2l VPS: /var/www/s2l/user-content/scripts/vimeo-course-sync/ containing sync.py, run.sh, tag-map.json, and logs and backups subfolders.
- First live refresh run: 22 lessons across three courses (Wifi, SARS isiXhosa, WhatsApp isiXhosa) had their Vimeo titles, descriptions, thumbnails and durations refreshed. Wifi course total minutes recalculated from 18 to 21 based on Vimeo durations. No lessons added, removed or unpublished.
- Cron entry added at 02:15 daily to call the sync runner.
- Backup of all affected course and lesson rows written to backups/20260524-135325-pre-sync.sql before the first live run.
Follow-ups
- Review SARS English and Online Meetings with Hasmukh. Decide whether the extras tagged on Vimeo should be brought onto the site, hidden, or the tag should be cleaned up on the Vimeo side, then remove those two courses from the skip list in tag-map.json.
- Save a memory entry pointing future sessions at the sync folder, the tag map, the skip list, the soft-delete behaviour, and the 02:15 schedule, so the playbook for adding a brand new course can mention that ongoing refresh is automatic.