File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def populate(
158
158
max_calls = None ,
159
159
display_progress = False ,
160
160
processes = 1 ,
161
- make_kwargs = None
161
+ make_kwargs = None ,
162
162
):
163
163
"""
164
164
``table.populate()`` calls ``table.make(key)`` for every primary key in
@@ -275,7 +275,7 @@ def _populate1(
275
275
if jobs is not None :
276
276
jobs .complete (self .target .table_name , self ._job_key (key ))
277
277
else :
278
- logger .debug ("Populating: " + str ( key ) )
278
+ logger .debug (f"Making { key } -> { self . target . table_name } " )
279
279
self .__class__ ._allow_insert = True
280
280
try :
281
281
make (dict (key ), ** (make_kwargs or {}))
@@ -288,6 +288,9 @@ def _populate1(
288
288
exception = error .__class__ .__name__ ,
289
289
msg = ": " + str (error ) if str (error ) else "" ,
290
290
)
291
+ logger .debug (
292
+ f"Error making { key } -> { self .target .table_name } - { error_message } "
293
+ )
291
294
if jobs is not None :
292
295
# show error name and error message (if any)
293
296
jobs .error (
@@ -303,6 +306,7 @@ def _populate1(
303
306
return key , error if return_exception_objects else error_message
304
307
else :
305
308
self .connection .commit_transaction ()
309
+ logger .debug (f"Success making { key } -> { self .target .table_name } " )
306
310
if jobs is not None :
307
311
jobs .complete (self .target .table_name , self ._job_key (key ))
308
312
finally :
Original file line number Diff line number Diff line change 7
7
8
8
log_level = os .getenv ("DJ_LOG_LEVEL" , "info" ).upper ()
9
9
10
- log_format = logging .Formatter (
11
- "[%(asctime)s][%(levelname)s]: %(message)s"
12
- )
10
+ log_format = logging .Formatter ("[%(asctime)s][%(levelname)s]: %(message)s" )
13
11
14
12
stream_handler = logging .StreamHandler () # default handler
15
13
stream_handler .setFormatter (log_format )
You can’t perform that action at this time.
0 commit comments