Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
plugins
twitter-v2
Merge requests
!11
update directly
Code
Review changes
Check out branch
Download
Email patches
Plain diff
Merged
Aziz Berkay Yesilyurt
requested to merge
aziz/optim
into
dev
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
0
0
Compare
dev
dev (base)
and
latest version
latest version
63cd6a0c
1 commit,
2 years ago
1 file
+
2
-
7
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
twitter_v2/plugin.py
+
2
-
7
Options
View file @ 63cd6a0c
Edit in single-file editor
Open in Web IDE
Show full file
@@ -118,16 +118,11 @@ class TwitterPlugin(PluginBase):
def
import_tweets
(
self
):
# Half of the time is spent until now
self
.
update
_progress
(
0.5
)
self
.
set
_progress
(
0.5
)
for
page
in
self
.
tweepy_producer
.
get_home_timeline
():
for
tweepy_tweet
in
page
.
tweets
:
self
.
create_tweet_item
(
tweepy_tweet
)
self
.
update_progress
(
1
)
def
update_progress
(
self
,
progress
):
if
self
.
pluginRun
:
self
.
pluginRun
.
progress
=
progress
self
.
pod_queue
.
put
(
update_items
=
[
self
.
pluginRun
])
self
.
set_progress
(
1
)
def
is_external_id_in_pod
(
self
,
item_type
:
Type
[
Union
[
Tweet
,
Account
]],
external_id
:
str
Menu
Explore
Projects
Groups
Snippets