Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
2a133cdd
Commit
2a133cdd
authored
Oct 06, 2015
by
Giorgos Korfiatis
Browse files
move some loggings to debug
parent
3608fb0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
agkyra/syncer/messaging.py
View file @
2a133cdd
...
...
@@ -85,8 +85,8 @@ class HeartbeatNoDecideMessage(Message):
Message
.
__init__
(
self
,
*
args
,
**
kwargs
)
self
.
objname
=
kwargs
[
"objname"
]
self
.
heartbeat
=
kwargs
[
"heartbeat"
]
self
.
logger
.
warnin
g
(
"Object '%s' already handled; aborting."
%
self
.
objname
)
self
.
logger
.
debu
g
(
"Object '%s' already handled; aborting
deciding
."
%
self
.
objname
)
class
HeartbeatReplayDecideMessage
(
Message
):
...
...
agkyra/syncer/pithos_client.py
View file @
2a133cdd
...
...
@@ -74,8 +74,8 @@ class PithosSourceHandle(object):
headers
=
dict
()
with
open
(
fetched_fspath
,
mode
=
'wb+'
)
as
fil
:
try
:
logger
.
info
(
"Downloading object: '%s', to: '%s'"
%
(
self
.
objname
,
fetched_fspath
))
logger
.
debug
(
"Downloading object: '%s', to: '%s'"
%
(
self
.
objname
,
fetched_fspath
))
self
.
endpoint
.
download_object
(
self
.
objname
,
fil
,
...
...
@@ -93,12 +93,12 @@ class PithosSourceHandle(object):
"pithos_type"
:
actual_type
}
self
.
check_update_source_state
(
actual_info
)
if
actual_info
==
{}:
logger
.
info
(
"Downloading object: '%s', object is gone."
%
self
.
objname
)
logger
.
debug
(
"Downloading object: '%s', object is gone."
%
self
.
objname
)
os
.
unlink
(
fetched_fspath
)
elif
actual_info
[
"pithos_type"
]
==
common
.
T_DIR
:
logger
.
info
(
"Downloading object: '%s', object is dir."
%
self
.
objname
)
logger
.
debug
(
"Downloading object: '%s', object is dir."
%
self
.
objname
)
os
.
unlink
(
fetched_fspath
)
os
.
mkdir
(
fetched_fspath
)
return
fetched_fspath
...
...
agkyra/syncer/syncer.py
View file @
2a133cdd
...
...
@@ -122,7 +122,7 @@ class FileSyncer(object):
self
.
_do_probe_file
(
db
,
archive
,
objname
,
ident
)
def
_do_probe_file
(
self
,
db
,
archive
,
objname
,
ident
):
logger
.
info
(
"Probing archive: %s, object: '%s'"
%
(
archive
,
objname
))
logger
.
debug
(
"Probing archive: %s, object: '%s'"
%
(
archive
,
objname
))
client
=
self
.
clients
[
archive
]
db_state
=
db
.
get_state
(
archive
,
objname
)
ref_state
=
db
.
get_state
(
self
.
SYNC
,
objname
)
...
...
@@ -242,7 +242,7 @@ class FileSyncer(object):
def
_do_decide_file_sync
(
self
,
db
,
objname
,
master
,
slave
,
ident
,
dry_run
=
False
):
logger
.
info
(
"Deciding object: '%s'"
%
objname
)
logger
.
debug
(
"Deciding object: '%s'"
%
objname
)
master_state
=
db
.
get_state
(
master
,
objname
)
slave_state
=
db
.
get_state
(
slave
,
objname
)
sync_state
=
db
.
get_state
(
self
.
SYNC
,
objname
)
...
...
@@ -333,7 +333,7 @@ class FileSyncer(object):
max_alive_threads
=
self
.
settings
.
max_alive_sync_threads
new_threads
=
max_alive_threads
-
alive_threads
if
new_threads
>
0
:
logger
.
info
(
"Can start max %s syncs"
%
new_threads
)
logger
.
debug
(
"Can start max %s syncs"
%
new_threads
)
for
i
in
range
(
new_threads
):
try
:
tpl
=
self
.
sync_queue
.
get
(
block
=
False
)
...
...
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