We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d59645a commit 40f020dCopy full SHA for 40f020d
setup.py
@@ -19,7 +19,7 @@
19
20
dist = setup(
21
name='twitter-tap',
22
- version='2.2.0',
+ version='2.2.1',
23
author='Janez Kranjc',
24
description='Collect tweets to a mongoDB using either the Twitter search API or the streaming API.',
25
long_description=long_description,
twitter_tap/filer.py
@@ -24,7 +24,7 @@ def emit(self, dict_entry):
text_to_wtite = json.dumps(dict_entry) + "\n"
self.file.write(text_to_wtite)
26
self.counter += 1
27
- if self.counter > self.flush_every:
+ if self.counter % self.flush_every == 0:
28
self.file.flush()
29
if self.counter >= self.n: # add condition "if new day"
30
self.close_file()
0 commit comments