Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
04164779
Commit
04164779
authored
6 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Fix issue #51
parent
e5223731
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beem/discussions.py
+15
-8
15 additions, 8 deletions
beem/discussions.py
with
15 additions
and
8 deletions
beem/discussions.py
+
15
−
8
View file @
04164779
...
@@ -80,13 +80,15 @@ class Discussions(object):
...
@@ -80,13 +80,15 @@ class Discussions(object):
elif
limit
<
100
and
discussion_query
[
"
limit
"
]
==
0
:
elif
limit
<
100
and
discussion_query
[
"
limit
"
]
==
0
:
discussion_query
[
"
limit
"
]
=
limit
discussion_query
[
"
limit
"
]
=
limit
query_count
=
0
query_count
=
0
found_more_than_start_entry
=
True
start_author
=
discussion_query
[
"
start_author
"
]
start_author
=
discussion_query
[
"
start_author
"
]
start_permlink
=
discussion_query
[
"
start_permlink
"
]
start_permlink
=
discussion_query
[
"
start_permlink
"
]
start_tag
=
discussion_query
[
"
start_permlink
"
]
start_tag
=
discussion_query
[
"
start_tag
"
]
while
(
query_count
<
limit
):
while
(
query_count
<
limit
and
found_more_than_start_entry
):
rpc_query_count
=
0
discussion_query
[
"
start_author
"
]
=
start_author
discussion_query
[
"
start_author
"
]
=
start_author
discussion_query
[
"
start_permlink
"
]
=
start_permlink
discussion_query
[
"
start_permlink
"
]
=
start_permlink
discussion_query
[
"
start_
permlink
"
]
=
start_tag
discussion_query
[
"
start_
tag
"
]
=
start_tag
if
discussion_type
==
"
trending
"
:
if
discussion_type
==
"
trending
"
:
dd
=
Discussions_by_trending
(
discussion_query
,
steem_instance
=
self
.
steem
,
lazy
=
self
.
lazy
)
dd
=
Discussions_by_trending
(
discussion_query
,
steem_instance
=
self
.
steem
,
lazy
=
self
.
lazy
)
elif
discussion_type
==
"
author_before_date
"
:
elif
discussion_type
==
"
author_before_date
"
:
...
@@ -121,16 +123,21 @@ class Discussions(object):
...
@@ -121,16 +123,21 @@ class Discussions(object):
dd
=
Trending_tags
(
discussion_query
,
steem_instance
=
self
.
steem
,
lazy
=
self
.
lazy
)
dd
=
Trending_tags
(
discussion_query
,
steem_instance
=
self
.
steem
,
lazy
=
self
.
lazy
)
for
d
in
dd
:
for
d
in
dd
:
double_result
=
Tru
e
double_result
=
Fals
e
if
discussion_type
==
"
tags
"
:
if
discussion_type
==
"
tags
"
:
if
query_count
==
0
or
(
d
[
"
name
"
]
!=
start_tag
):
if
rpc_query_count
==
0
and
(
d
[
"
name
"
]
==
start_tag
):
double_result
=
False
double_result
=
True
if
len
(
dd
)
==
1
:
found_more_than_start_entry
=
False
start_tag
=
d
[
"
name
"
]
start_tag
=
d
[
"
name
"
]
else
:
else
:
if
query_count
==
0
or
(
d
[
"
author
"
]
!=
start_author
and
d
[
"
permlink
"
]
!=
start_permlink
):
if
rpc_query_count
==
0
and
(
d
[
"
author
"
]
==
start_author
and
d
[
"
permlink
"
]
==
start_permlink
):
double_result
=
False
double_result
=
True
if
len
(
dd
)
==
1
:
found_more_than_start_entry
=
False
start_author
=
d
[
"
author
"
]
start_author
=
d
[
"
author
"
]
start_permlink
=
d
[
"
permlink
"
]
start_permlink
=
d
[
"
permlink
"
]
rpc_query_count
+=
1
if
not
double_result
:
if
not
double_result
:
query_count
+=
1
query_count
+=
1
if
query_count
<=
limit
:
if
query_count
<=
limit
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment