Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
ec809a2d
Commit
ec809a2d
authored
Dec 14, 2020
by
Raphael Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add: --guest-sessions arg +
Sets number of Twitter guest sessions opened and used.
parent
11025e87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
backend.py
backend.py
+2
-1
docker-entry.sh
docker-entry.sh
+3
-1
No files found.
backend.py
View file @
ec809a2d
...
...
@@ -39,7 +39,6 @@ account_sessions = []
account_index
=
0
log_file
=
None
debug_file
=
None
guest_session_pool_size
=
10
guest_sessions
=
[]
test_index
=
0
...
...
@@ -559,9 +558,11 @@ parser.add_argument('--mongo-username', type=str, default=None, help='user with
parser
.
add_argument
(
'--mongo-password'
,
type
=
str
,
default
=
None
,
help
=
'password for --mongo-username'
)
parser
.
add_argument
(
'--twitter-auth-key'
,
type
=
str
,
default
=
None
,
help
=
'auth key for twitter guest session'
,
required
=
True
)
parser
.
add_argument
(
'--cors-allow'
,
type
=
str
,
default
=
None
,
help
=
'value for Access-Control-Allow-Origin header'
)
parser
.
add_argument
(
'--guest-sessions'
,
type
=
int
,
default
=
10
,
help
=
'number of Twitter guest sessions to use'
)
args
=
parser
.
parse_args
()
TwitterSession
.
twitter_auth_key
=
args
.
twitter_auth_key
guest_session_pool_size
=
args
.
guest_sessions
if
(
args
.
cors_allow
is
None
):
debug
(
'[CORS] Running without CORS headers'
)
...
...
docker-entry.sh
View file @
ec809a2d
...
...
@@ -14,6 +14,7 @@ echo "--mongo-username $MONGO_USERNAME"
echo
"--mongo-password --REDACTED--"
echo
"--twitter-auth-key --REDACTED--"
echo
"--cors-allow
$CORS_HOST
"
echo
"--guest-sessions
$GUEST_SESSIONS
"
python3
-u
./backend.py
\
--account-file
$ACCOUNT_FILE
\
...
...
@@ -28,4 +29,5 @@ python3 -u ./backend.py \
--mongo-username
$MONGO_USERNAME
\
--mongo-password
$MONGO_PASSWORD
\
--twitter-auth-key
$TWITTER_AUTH_KEY
\
--cors-allow
$CORS_HOST
--cors-allow
$CORS_HOST
\
--guest-sessions
$GUEST_SESSIONS
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment