h3poteto / asumibot Goto Github PK
View Code? Open in Web Editor NEW阿澄病患者のための治療薬
Home Page: http://www.asumi.ch/
阿澄病患者のための治療薬
Home Page: http://www.asumi.ch/
こいつがredisを圧迫するとwhalebirdの方に影響が出るので,分離しておきたい
jpmobile導入に伴い,ページキャッシュが使えなくなります.jpmobile対応時にキャッシュを一度無効にするので,再度アクションキャッシュを導入します.
ユーザ名が絵文字になると全然駄目だ
キーワードだとやはりノイズがまじる
sqlを整理,合わせてview内に書いているコードをできるだけhelperに移行.
これをやらないと,スマホでメニューを出せない
patients#indexはページキャッシュしているので,一度キャッシュをすべて廃止します.
pidファイルを残せるので,pidファイル方式にして存在チェックしよう.
デプロイ時に変な挙動をすることもあるのでプロセス自体の存在チェックも.
そして,1日に一回くらいプロセスを強制再起動するといいかも.
やはりまだ治っていない模様
An exception occurred: 'Mysql2::Error: Incorrect string value: '\xF0\x9F\x91\x8D\x0A\x0A...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (409, 'もこちゃんよくやった!!\n俺も単行本派だったのに…\n前向きにいきましょう:thumbsup:\n\n#agqr #hoshihina', '635816710117957632', '2015-08-24 05:11:31.000000', '2015-08-24 14:36:16.921558', '2015-08-24 14:36:16.921558')' on '/srv/www/asumibot/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query''
*Data:*
sidekiq: {"retry"=>true, "queue"=>"default", "class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", "args"=>[{"job_class"=>"PatientJob", "job_id"=>"f2dcb84c-75f7-48b1-9c94-9a54c2e4e411", "queue_name"=>"default", "arguments"=>[3199188720, "もこちゃんよくやった!!\n俺も単行本派だったのに…\n前向きにいきましょう:thumbsup:\n\n#agqr #hoshihina", "635816710117957632", "2015-08-24 14:11:31"]}], "jid"=>"738e4c4206923498a983cece", "enqueued_at"=>1440425491.491001, "error_message"=>"Mysql2::Error: Incorrect string value: '\\xF0\\x9F\\x91\\x8D\\x0A\\x0A...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (409, 'もこちゃんよくやった!!\\n俺も単行本派だったのに…\\n前向きにいきましょう:thumbsup:\\n\\n#agqr #hoshihina', '635816710117957632', '2015-08-24 05:11:31.000000', '2015-08-24 14:36:16.921558', '2015-08-24 14:36:16.921558')", "error_class"=>"ActiveRecord::StatementInvalid", "failed_at"=>1440425491.5540748, "retry_count"=>6, "retried_at"=>1440426976.9360185}
*Backtrace:*
app/jobs/patient_job.rb:11:in `perform'
1) niconico:popular should change result from 0
Failure/Error: expect{ subject.invoke }.to change{ NiconicoPopular.count }.from(0)
expected result to have changed from 0, but did not change
# ./spec/lib/tasks/niconico_rake_spec.rb:21:in `block (2 levels) in <top (required)>'
Finished in 29.88 seconds (files took 6.42 seconds to load)
362 examples, 1 failure
Failed examples:
rspec ./spec/lib/tasks/niconico_rake_spec.rb:20 # niconico:popular should change result from 0 bundle exec rspec spec/ returned exit code 1
おそらくニコニコAPI接続系でリミットに達しやすいのだと思われる
cronのタスクが延々を生き残り続けている
An exception occurred: 'wrong number of arguments (1 for 2)' on '/srv/www/asumibot/releases/20150720092259/lib/modules/twitter_client.rb:11:in update'' Data: rake_command_line: rake rss:recent --silent Backtrace: lib/modules/twitter_client.rb:11:in
update'
lib/tasks/rss.rake:21:in `block (2 levels) in <top (required)>'
おそらくAPI変更か何かだとは思うが
screen_nameの後ろにスペースを入れないと
二重に解析されている可能性がある
エラー落ちするようになってる……
ランダムセレクトと新着があればいいと思う.
ニコニコとyoutubeをランダムに織り交ぜて.
rakeタスクに書いておけばいいか
asumistreamタスクは死活監視していたけど,sidekiqは死活監視してないんだ
An exception occurred: 'undefined method `*' for nil:NilClass' on '/srv/www/asumibot/releases/20150720092259/app/controllers/patients_controller.rb:51:in `block in show''
*Backtrace:*
app/controllers/patients_controller.rb:51:in `block in show'
app/controllers/patients_controller.rb:47:in `show'
おそらくランキングか何かの集計でエラーになっている
deploy時に無駄なmonitorが走るので,pidチェック方式に変更しよう
阿澄度計算がどこかでバグってる可能性大
jpmobile入れて,とりあえずのスマホ対応化を進めます
WARN: {"retry"=>true, "queue"=>"default", "class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", "args"=>[{"job_class"=>"PatientJob", "job_id"=>"3e9256bb-\
fc71-47a4-9968-a8b14de935d5", "queue_name"=>"default", "arguments"=>[2201148458, "RT @I_love_alive_: #阿澄佳奈生誕祭\n\n┏┓┏┓。・゚゚・。。゚☆\n┃┗┛ appy☆\n┃┏┓┃ birth☆\n┗┛┗┛ day*゚☆\n\nもこちゃん、お誕生日おめでとう\
🎉 http://t.co/pwXybO60Ix", "631258529282658305", "2015-08-12 00:18:56"]}], "jid"=>"fc8126d7229b66348a23ec67", "enqueued_at"=>1439338736.6846151, "error_message"=>"Mysql2::Error: Incorrect string value: '\\xF0\
\\x9F\\x8E\\x89 h...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (288, 'RT @I_love_alive_: #阿澄佳奈生誕祭\\n\\
\n┏┓┏┓。・゚゚・。。゚☆\\n┃┗┛ appy☆\\n┃┏┓┃ birth☆\\n┗┛┗┛ day*゚☆\\n\\nもこちゃん、お誕生日おめでとう🎉 http://t.co/pwXybO60Ix', '631258529282658305', '2015-08-11 15:18:56.000000', '2015-08-12 07:48:23.639927', '201\
5-08-12 07:48:23.639927')", "error_class"=>"ActiveRecord::StatementInvalid", "failed_at"=>1439338737.1782572, "retry_count"=>11, "retried_at"=>1439365703.6524634}
2015-08-12T07:48:23.664Z 9000 TID-osrbvjo8s WARN: Mysql2::Error: Incorrect string value: '\xF0\x9F\x8E\x89 h...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tw\
eet_time`, `created_at`, `updated_at`) VALUES (288, 'RT @I_love_alive_: #阿澄佳奈生誕祭\n\n┏┓┏┓。・゚゚・。。゚☆\n┃┗┛ appy☆\n┃┏┓┃ birth☆\n┗┛┗┛ day*゚☆\n\nもこちゃん、お誕生日おめでとう🎉 http://t.co/pwXybO60Ix', '6\
31258529282658305', '2015-08-11 15:18:56.000000', '2015-08-12 07:48:23.639927', '2015-08-12 07:48:23.639927')
An exception occurred: 'undefined method `each' for nil:NilClass' on '/srv/www/asumibot/releases/20150719092810/lib/modules/niconico_client.rb:46:in `block in get_today_movies''
*Data:*
rake_command_line: rake niconico:new --silent
*Backtrace:*
lib/modules/niconico_client.rb:46:in `block in get_today_movies'
lib/modules/niconico_client.rb:39:in `each'
lib/modules/niconico_client.rb:39:in `get_today_movies'
lib/tasks/niconico.rake:11:in `block (2 levels) in <top (required)>'
recommends#index
patients#index
twitterbotへのリンク
分離しておかないと同じキーが使えなくて困る.
コレに伴い,DB関連情報も揃えていい気がする.
youtubeのdeveloper_keyも本番用を用意してデプロイ.
以前やっていたように,S3 -> CloudFrontとして読み込む形にします.同じくprecompile後のmanifestのみをコミットに含めたい
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.