Changeset - 4bb61b98b4fc
[Not reviewed]
0 1 0
Vitaly Takmazov - 7 years ago 2018-08-16 20:46:43
vitalyster@gmail.com
Twitter backend: disable DM polling

* Twitter make Direct Message API deprecated, DM polling is disabled until backend upgraded to new API
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -72,25 +72,25 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora
 
	m_factories = new Swift::BoostNetworkFactories(loop);
 
	m_conn = m_factories->getConnectionFactory()->createConnection();
 
	m_conn->onDataRead.connect(boost::bind(&TwitterPlugin::_handleDataRead, this, _1));
 
	m_conn->connect(Swift::HostAddressPort(SWIFT_HOSTADDRESS(host), port));
 

	
 
	tp = new ThreadPool(loop_, 10);
 

	
 
	LOG4CXX_INFO(logger, "Fetch timeout is set to " << CONFIG_INT_DEFAULTED(config, "twitter.fetch_timeout", 90000));
 
	tweet_timer = m_factories->getTimerFactory()->createTimer(CONFIG_INT_DEFAULTED(config, "twitter.fetch_timeout", 90000));
 
	message_timer = m_factories->getTimerFactory()->createTimer(CONFIG_INT_DEFAULTED(config, "twitter.fetch_timeout", 90000));
 

	
 
	tweet_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForTweets, this));
 
	message_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForDirectMessages, this));
 
	//message_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForDirectMessages, this));
 

	
 
	tweet_timer->start();
 
	message_timer->start();
 

	
 
#if HAVE_SWIFTEN_3
 
		cryptoProvider = SWIFTEN_SHRPTR_NAMESPACE::shared_ptr<Swift::CryptoProvider>(Swift::PlatformCryptoProvider::create());
 
#endif
 

	
 

	
 
	LOG4CXX_INFO(logger, "Starting the plugin.");
 
}
 

	
0 comments (0 inline, 0 general)