111111 %
112112 % See also dj.internal.AutoPopulate/parpopulate
113113
114- if ~dj .set( ' populateAncestors ' )
114+ if ~dj .config( ' queryPopulate_ancestors ' )
115115 rels = {self };
116116 else
117117 % get all ancestors to be populated before self
118118 assert(nargout == 0 , ...
119- ' parpopulate cannot return output when populateAncestors is true' )
119+ ' parpopulate cannot return output when queryPopulate_ancestors is true' )
120120 rels = cellfun(@feval , self .ancestors , ' uni' , false );
121121 rels = rels(cellfun(@(x ) isa(x ,' dj.internal.AutoPopulate' ), rels ));
122122 end
@@ -149,8 +149,10 @@ function parpopulate(self, varargin)
149149 % key=null : blob # structure containing the key
150150 % error_message="" : varchar(1023) # error message returned if failed
151151 % error_stack=null : blob # error stack if failed
152+ % user="" : varchar(255) # database user
152153 % host="" : varchar(255) # system hostname
153154 % pid=0 : int unsigned # system process id
155+ % connection_id=0 : bigint unsigned # database connection id
154156 % timestamp=CURRENT_TIMESTAMP : timestamp # automatic timestamp
155157 %
156158 % A job is considered to be available when <package>.Jobs contains
@@ -171,7 +173,7 @@ function parpopulate(self, varargin)
171173 %
172174 % See also dj.internal.AutoPopulate/populate
173175
174- if ~dj .set( ' populateAncestors ' )
176+ if ~dj .config( ' queryPopulate_ancestors ' )
175177 rels = {self };
176178 else
177179 % get all ancestors to be populated before self
@@ -375,7 +377,7 @@ function cleanup(self, key)
375377 success = false ;
376378 end
377379 end
378- if ~success && dj .set( ' verbose ' )
380+ if ~success && strcmpi( dj .config( ' loglevel ' ), ' DEBUG ' )
379381 fprintf(' ** %s : skipping already reserved\n ' , self .className )
380382 disp(key )
381383 end
@@ -390,8 +392,10 @@ function cleanup(self, key)
390392 catch
391393 [~ ,host ] = system(' hostname' );
392394 end
395+ jobKey.user = self .schema .conn .user ;
393396 jobKey.host = strtrim(host );
394397 jobKey.pid = feature(' getpid' );
398+ jobKey.connection_id = self .schema .conn .serverId ;
395399 end
396400 if ismember(' error_key' , self .jobs .header .names )
397401 % for backward compatibility with versions prior to 2.6.3
@@ -420,8 +424,10 @@ function createJobTable(self)
420424 fprintf(f , ' key=null : blob # structure containing the key\n ' );
421425 fprintf(f , ' error_message="" : varchar(1023) # error message returned if failed\n ' );
422426 fprintf(f , ' error_stack=null : blob # error stack if failed\n ' );
427+ fprintf(f , ' user="" : varchar(255) # database user\n ' );
423428 fprintf(f , ' host="" : varchar(255) # system hostname\n ' );
424429 fprintf(f , ' pid=0 : int unsigned # system process id\n ' );
430+ fprintf(f , ' connection_id=0 : bigint unsigned # database connection id\n ' );
425431 fprintf(f , ' timestamp=CURRENT_TIMESTAMP : timestamp # automatic timestamp\n ' );
426432 fprintf(f , ' %% }\n\n ' );
427433 fprintf(f , ' classdef Jobs < dj.Jobs\n ' );
@@ -433,8 +439,8 @@ function createJobTable(self)
433439 function populateSanityChecks(self )
434440 % Performs sanity checks that are common to populate,
435441 % parpopulate and batch_populate.
436- % To disable the sanity check: dj.set('populateCheck ',false)
437- if dj .set( ' populateCheck ' )
442+ % To disable the sanity check: dj.config('queryPopulate_check ',false)
443+ if dj .config( ' queryPopulate_check ' )
438444 source = self .getKeySource ;
439445 abovePopRel = setdiff(self .primaryKey(1 : min(end ,length(source .primaryKey ))), source .primaryKey );
440446 if ~all(ismember(source .primaryKey , self .primaryKey ))
0 commit comments