Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hash_backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Anders Blomdell
hash_backup
Commits
8dae1216
Commit
8dae1216
authored
4 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Improve error exit somewhat...
parent
ce29b782
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
secondary.py
+7
-0
7 additions, 0 deletions
secondary.py
with
7 additions
and
0 deletions
secondary.py
+
7
−
0
View file @
8dae1216
...
@@ -26,6 +26,12 @@ def cond_kill(p):
...
@@ -26,6 +26,12 @@ def cond_kill(p):
except
:
except
:
pass
pass
def
cond_shutdown
(
s
):
try
:
s
.
shutdown
(
socket
.
SHUT_RDWR
)
except
:
pass
class
Status
:
class
Status
:
def
__init__
(
self
,
log
):
def
__init__
(
self
,
log
):
...
@@ -182,6 +188,7 @@ def do_backup(hash_name, options, socket_path, mount, path):
...
@@ -182,6 +188,7 @@ def do_backup(hash_name, options, socket_path, mount, path):
# Connect to server config/hashtoc socket
# Connect to server config/hashtoc socket
config_hash
=
socket
.
socket
(
socket
.
AF_UNIX
,
socket
.
SOCK_STREAM
)
config_hash
=
socket
.
socket
(
socket
.
AF_UNIX
,
socket
.
SOCK_STREAM
)
atexit
.
register
(
cond_shutdown
,
config_hash
,
log
)
config_hash
.
connect
(
socket_path
)
config_hash
.
connect
(
socket_path
)
# Send secondary config to primary
# Send secondary config to primary
config_hash
.
makefile
(
'
w
'
).
write
(
open
(
config_path
).
read
())
config_hash
.
makefile
(
'
w
'
).
write
(
open
(
config_path
).
read
())
...
...
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