+++ date = "2017-04-26" tags = ["sns"] title = "Mastodonの画像キャッシュやタイムライン" slug = "sns" +++ Mastodonの購読は少し複雑になっていて、`/lib/tasks`にあるスクリプトによって処理するよう管理者に促されており、cronで定期的に実行するような感じ。 https://github.com/tootsuite/mastodon/blob/master/lib/tasks/mastodon.rake Herokuの場合はSchedulerというものがあって、これで定期的に処理を実行可能なので設定する。 ```bash $ heroku addons:add scheduler:standard $ heroku addons:open scheduler > rake mastodon:daily ``` Streaming APIとかの情報もあって気になる。 https://github.com/zunda/mastodon/wiki/CreateInstanceOnHeroku https://github.com/tootsuite/documentation/blob/master/Using-the-API/Streaming-API.md