简体   繁体   English

Geddy-运行其他过程-Twitter Stream

[英]Geddy - Run additional process - Twitter Stream

I'm curious if anyone has any experience when running Geddy, if you can also run an additional resource, such as: https://github.com/AvianFlu/ntwitter 我很好奇是否有人在运行Geddy时有任何经验,是否还可以运行其他资源,例如: https : //github.com/AvianFlu/ntwitter

Would it be possible if you were to include the above via the package.json and reference it like: 如果可以通过package.json包含上述内容,并像这样引用它,那将是可能的:

var twitter = require('ntwitter');

var twit = new twitter({
  consumer_key: 'Twitter',
  consumer_secret: 'API',
  access_token_key: 'keys',
  access_token_secret: 'go here'
});

Then when you run geddy, it spawns another instance of itself, that would have access to models, etc, for saving tweets from the twitter streaming api? 然后,当您运行geddy时,它会生成自身的另一个实例,该实例可以访问模型等,以保存来自Twitter流API的推文? I know that I could just run it as a node server, then save the results to mongodb, but was hoping it's possible to start all of this and keep it within geddy. 我知道我可以将其作为节点服务器运行,然后将结果保存到mongodb,但希望可以启动所有这些并将其保留在geddy中。

Complete noob here when it comes to Geddy and Node. 关于Geddy和Node,请在这里完成。

One way to accomplish this is to create a Jake task that does your twitter streaming stuff, and run that through geddy. 实现此目的的一种方法是创建一个Jake任务,该任务执行您的Twitter流媒体内容,并通过geddy运行它。

Once you have the jake task written you can run it with 'geddy jake myTask'. 编写完jake任务后,可以使用“ geddy jake myTask”运行它。 The task will have access to models etc. 该任务将有权访问模型等。

And you can start this task along with the geddy server to keep things neat. 您可以与geddy服务器一起启动此任务,以保持事情整洁。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM