forked from cybrespace/mastodon
		
	Fix rake tasks and loading bar
This commit is contained in:
		
							parent
							
								
									1cfc9aa20e
								
							
						
					
					
						commit
						a86f21cf90
					
				
					 3 changed files with 17 additions and 7 deletions
				
			
		| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					import { connect }    from 'react-redux';
 | 
				
			||||||
 | 
					import LoadingBar from 'react-redux-loading-bar';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const mapStateToProps = (state) => ({
 | 
				
			||||||
 | 
					  loading: state.get('loadingBar')
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@ import StatusListContainer    from './containers/status_list_container';
 | 
				
			||||||
import NotificationsContainer from './containers/notifications_container';
 | 
					import NotificationsContainer from './containers/notifications_container';
 | 
				
			||||||
import NavigationContainer    from './containers/navigation_container';
 | 
					import NavigationContainer    from './containers/navigation_container';
 | 
				
			||||||
import PureRenderMixin        from 'react-addons-pure-render-mixin';
 | 
					import PureRenderMixin        from 'react-addons-pure-render-mixin';
 | 
				
			||||||
import LoadingBar             from 'react-redux-loading-bar';
 | 
					import LoadingBarContainer    from './containers/loading_bar_container';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const UI = React.createClass({
 | 
					const UI = React.createClass({
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +46,7 @@ const UI = React.createClass({
 | 
				
			||||||
        </ColumnsArea>
 | 
					        </ColumnsArea>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <NotificationsContainer />
 | 
					        <NotificationsContainer />
 | 
				
			||||||
        <LoadingBar style={{ backgroundColor: '#2b90d9', left: '0', top: '0' }} />
 | 
					        <LoadingBarContainer style={{ backgroundColor: '#2b90d9', left: '0', top: '0' }} />
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,13 @@ namespace :mastodon do
 | 
				
			||||||
    task clear: :environment do
 | 
					    task clear: :environment do
 | 
				
			||||||
      Account.remote.without_followers.find_each do |a|
 | 
					      Account.remote.without_followers.find_each do |a|
 | 
				
			||||||
        Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
 | 
					        Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
 | 
				
			||||||
        a.subscription('').unsubscribe
 | 
					        begin
 | 
				
			||||||
      rescue HTTP::Error, OpenSSL::SSL::SSLError
 | 
					          a.subscription('').unsubscribe
 | 
				
			||||||
        Rails.logger.debug "PuSH unsubscribing from #{a.acct} failed due to an HTTP or SSL error"
 | 
					        rescue HTTP::Error, OpenSSL::SSL::SSLError
 | 
				
			||||||
      ensure
 | 
					          Rails.logger.debug "PuSH unsubscribing from #{a.acct} failed due to an HTTP or SSL error"
 | 
				
			||||||
        a.update!(verify_token: '', secret: '', subscription_expires_at: nil)
 | 
					        ensure
 | 
				
			||||||
 | 
					          a.update!(verify_token: '', secret: '', subscription_expires_at: nil)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue