EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Data Handling
core
Commits
015b4987
Commit
015b4987
authored
3 years ago
by
Lubomir Dolezal
Browse files
Options
Downloads
Patches
Plain Diff
remove redis sets from registrar daemon
parent
dc6d134c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
remove redis sets from registrar daemon
Pipeline
#22056
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+0
-3
0 additions, 3 deletions
Dockerfile
registrar/cli.py
+0
-12
0 additions, 12 deletions
registrar/cli.py
registrar/daemon.py
+0
-11
0 additions, 11 deletions
registrar/daemon.py
with
0 additions
and
26 deletions
Dockerfile
+
0
−
3
View file @
015b4987
...
...
@@ -72,9 +72,6 @@ ENV INSTANCE_ID="view-server_core" \
REDIS_PORT="6379" \
REDIS_REGISTER_QUEUE_KEY="register_queue" \
REDIS_REGISTER_PATH_QUEUE_KEY="register_path_queue" \
REDIS_REGISTER_FAILURE_KEY="register-failure_set" \
REDIS_REGISTER_PROGRESS_KEY="registering_set" \
REDIS_REGISTER_SUCCESS_KEY="register-success_set" \
REDIS_DEREGISTER_QUEUE_KEY="deregister_queue" \
REDIS_DEREGISTER_PATH_QUEUE_KEY="deregister_path_queue" \
INIT_SCRIPTS="/opt/core/configure.sh" \
...
...
This diff is collapsed.
Click to expand it.
registrar/cli.py
+
0
−
12
View file @
015b4987
...
...
@@ -88,9 +88,6 @@ def cli():
@click.option
(
"
--register-path-queue
"
,
"
--listen-path-queue
"
,
type
=
str
)
@click.option
(
"
--deregister-queue
"
,
type
=
str
)
@click.option
(
"
--deregister-path-queue
"
,
type
=
str
)
@click.option
(
"
--progress-set
"
,
type
=
str
)
@click.option
(
"
--failure-set
"
,
type
=
str
)
@click.option
(
"
--success-set
"
,
type
=
str
)
@click.option
(
"
-e
"
,
"
--extra
"
,
type
=
str
,
multiple
=
True
,
default
=
[])
@click.option
(
"
--debug
"
,
is_flag
=
True
)
def
daemon
(
...
...
@@ -101,9 +98,6 @@ def daemon(
port
=
None
,
register_queue
=
None
,
register_path_queue
=
None
,
progress_set
=
None
,
failure_set
=
None
,
success_set
=
None
,
deregister_queue
=
None
,
deregister_path_queue
=
None
,
extra
=
None
,
...
...
@@ -120,9 +114,6 @@ def daemon(
--host redis --port 6379
\
--listen-queue register
\
--deregister-queue deregister
\
--progress-set register_progress
\
--failure-set register_failure
\
--success-set register_success
\
--extra some_queue=path.to.handler
\
--extra some_other_queue=path.to.another.handler
\
--debug
...
...
@@ -156,9 +147,6 @@ def daemon(
host
,
port
,
handlers
,
progress_set
,
failure_set
,
success_set
,
)
...
...
This diff is collapsed.
Click to expand it.
registrar/daemon.py
+
0
−
11
View file @
015b4987
...
...
@@ -25,9 +25,6 @@ def run_daemon(
host
:
str
,
port
:
int
,
handlers
:
Dict
[
str
,
QueueItemHandler
],
progress_set
:
str
,
failure_set
:
str
,
success_set
:
str
,
):
"""
Run the registrar daemon, listening on a redis queue
for items to be (de-)registered.
...
...
@@ -39,9 +36,6 @@ def run_daemon(
port (int): redis port
handlers (Dict[str, QueueItemCallback]): a queue mapping dictionary,
mapping the queue names to their respective handling callables
progress_set (str): name of set for items in progress
failure_set (str): name of set for failed items
success_set (str): name of set for successfully processed items
Raises:
Exception: Raised if path is already registered
...
...
@@ -61,12 +55,7 @@ def run_daemon(
queue
,
value
=
client
.
brpop
(
queue_names
)
try
:
client
.
sadd
(
progress_set
,
value
)
handler
=
handlers
[
queue
]
handler
(
config
,
value
,
replace
)
client
.
sadd
(
success_set
,
value
)
except
Exception
as
e
:
logger
.
exception
(
e
)
client
.
sadd
(
failure_set
,
value
)
finally
:
client
.
srem
(
progress_set
,
value
)
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