@@ -29,19 +29,21 @@ FileUtils.chdir APP_ROOT do
29
29
puts "\n == Upserting application data =="
30
30
system! 'bin/rails dojos:update_db_by_yaml'
31
31
system! 'bin/rails dojo_event_services:upsert'
32
-
33
- today = Time . now . in_time_zone ( 'Tokyo' ) . to_date
34
- from = ( today - 90 ) . strftime ( '%Y%m' )
35
- to = today . prev_month . strftime ( '%Y%m' )
36
- if ENV [ 'DOORKEEPER_API_TOKEN' ]
37
- system! "bin/rails statistics:aggregation[#{ from } ,#{ to } ]"
38
- system! 'bin/rails upcoming_events:aggregation'
39
- else
40
- puts doorkeeper_message
41
- system! "bin/rails statistics:aggregation[#{ from } ,#{ to } ,connpass]"
42
- system! "bin/rails statistics:aggregation[#{ from } ,#{ to } ,facebook]"
43
- system! 'bin/rails upcoming_events:aggregation[connpass]'
44
- end
32
+ system! "bin/rails statistics:aggregation[-,-,static_yaml]"
33
+
34
+ #today = Time.now.in_time_zone('Tokyo').to_date
35
+ #from = (today - 90).strftime('%Y%m')
36
+ #to = today.prev_month.strftime('%Y%m')
37
+ #if ENV['DOORKEEPER_API_TOKEN'] && ENV['FIXIE_URL']
38
+ # system! "bin/rails statistics:aggregation[#{from},#{to}]"
39
+ # system! 'bin/rails upcoming_events:aggregation'
40
+ #elsif ENV['DOORKEEPER_API_TOKEN']
41
+ # system! "bin/rails statistics:aggregation[#{from},#{to},connpass]"
42
+ # system! "bin/rails statistics:aggregation[#{from},#{to},facebook]"
43
+ # system! 'bin/rails upcoming_events:aggregation[connpass]'
44
+ #else
45
+ # puts event_services_message
46
+ #end
45
47
46
48
puts "\n == Removing old logs and tempfiles =="
47
49
system! "bin/rails log:clear tmp:clear"
@@ -54,18 +56,13 @@ FileUtils.chdir APP_ROOT do
54
56
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
55
57
end
56
58
57
- def doorkeeper_message
59
+ def event_services_message
58
60
<<~MESSAGE
59
61
60
- 環境変数 DOORKEEPER_API_TOKEN が設定されていないため、
61
- Doorkeeper API を使ったイベント情報の取得をスキップします。
62
-
63
- Doorkeeper のイベントを取得するためには、
64
- 下記ページから Doorkeeper API Token を取得し、
65
- 環境変数 DOORKEEPER_API_TOKEN に設定してください。
66
- https://manage.doorkeeper.jp/user/oauth/applications
67
-
68
- 環境変数設定後に、bin/setup を再実行してください!
62
+ 環境変数 DOORKEEPER_API_TOKEN と FIXIE_URL が設定されていないため、
63
+ Doorkeeper API や connpass API を使ったイベント情報の取得をスキップします。
69
64
65
+ なお API 経由でイベント情報を取得しなくても、rails server は実行可能です。
66
+ もし API 経由でイベント情報を取得したい場合は開発チームにご連絡ください。
70
67
MESSAGE
71
68
end
0 commit comments