111
111
%
112
112
% See also dj.internal.AutoPopulate/parpopulate
113
113
114
- if ~dj .set( ' populateAncestors ' )
114
+ if ~dj .config( ' queryPopulate_ancestors ' )
115
115
rels = {self };
116
116
else
117
117
% get all ancestors to be populated before self
118
118
assert(nargout == 0 , ...
119
- ' parpopulate cannot return output when populateAncestors is true' )
119
+ ' parpopulate cannot return output when queryPopulate_ancestors is true' )
120
120
rels = cellfun(@feval , self .ancestors , ' uni' , false );
121
121
rels = rels(cellfun(@(x ) isa(x ,' dj.internal.AutoPopulate' ), rels ));
122
122
end
@@ -149,8 +149,10 @@ function parpopulate(self, varargin)
149
149
% key=null : blob # structure containing the key
150
150
% error_message="" : varchar(1023) # error message returned if failed
151
151
% error_stack=null : blob # error stack if failed
152
+ % user="" : varchar(255) # database user
152
153
% host="" : varchar(255) # system hostname
153
154
% pid=0 : int unsigned # system process id
155
+ % connection_id=0 : bigint unsigned # database connection id
154
156
% timestamp=CURRENT_TIMESTAMP : timestamp # automatic timestamp
155
157
%
156
158
% A job is considered to be available when <package>.Jobs contains
@@ -171,7 +173,7 @@ function parpopulate(self, varargin)
171
173
%
172
174
% See also dj.internal.AutoPopulate/populate
173
175
174
- if ~dj .set( ' populateAncestors ' )
176
+ if ~dj .config( ' queryPopulate_ancestors ' )
175
177
rels = {self };
176
178
else
177
179
% get all ancestors to be populated before self
@@ -375,7 +377,7 @@ function cleanup(self, key)
375
377
success = false ;
376
378
end
377
379
end
378
- if ~success && dj .set( ' verbose ' )
380
+ if ~success && strcmpi( dj .config( ' loglevel ' ), ' DEBUG ' )
379
381
fprintf(' ** %s : skipping already reserved\n ' , self .className )
380
382
disp(key )
381
383
end
@@ -390,8 +392,10 @@ function cleanup(self, key)
390
392
catch
391
393
[~ ,host ] = system(' hostname' );
392
394
end
395
+ jobKey.user = self .schema .conn .user ;
393
396
jobKey.host = strtrim(host );
394
397
jobKey.pid = feature(' getpid' );
398
+ jobKey.connection_id = self .schema .conn .serverId ;
395
399
end
396
400
if ismember(' error_key' , self .jobs .header .names )
397
401
% for backward compatibility with versions prior to 2.6.3
@@ -420,8 +424,10 @@ function createJobTable(self)
420
424
fprintf(f , ' key=null : blob # structure containing the key\n ' );
421
425
fprintf(f , ' error_message="" : varchar(1023) # error message returned if failed\n ' );
422
426
fprintf(f , ' error_stack=null : blob # error stack if failed\n ' );
427
+ fprintf(f , ' user="" : varchar(255) # database user\n ' );
423
428
fprintf(f , ' host="" : varchar(255) # system hostname\n ' );
424
429
fprintf(f , ' pid=0 : int unsigned # system process id\n ' );
430
+ fprintf(f , ' connection_id=0 : bigint unsigned # database connection id\n ' );
425
431
fprintf(f , ' timestamp=CURRENT_TIMESTAMP : timestamp # automatic timestamp\n ' );
426
432
fprintf(f , ' %% }\n\n ' );
427
433
fprintf(f , ' classdef Jobs < dj.Jobs\n ' );
@@ -433,8 +439,8 @@ function createJobTable(self)
433
439
function populateSanityChecks(self )
434
440
% Performs sanity checks that are common to populate,
435
441
% 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 ' )
438
444
source = self .getKeySource ;
439
445
abovePopRel = setdiff(self .primaryKey(1 : min(end ,length(source .primaryKey ))), source .primaryKey );
440
446
if ~all(ismember(source .primaryKey , self .primaryKey ))
0 commit comments