From: Dirk Koopman Date: Fri, 15 May 2020 23:24:41 +0000 (+0100) Subject: fix export_user cmd for now X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=2d43d3782490b5d684dec9852e05f927c7fa305a fix export_user cmd for now --- diff --git a/cmd/export_users.pl b/cmd/export_users.pl index 11009572..69cecc79 100644 --- a/cmd/export_users.pl +++ b/cmd/export_users.pl @@ -15,7 +15,7 @@ unless ($fn && $fn eq 'user_json') { } my $strip = $flag eq 'strip'; -my @out = DXUser::export($fn, $strip); +my @out = DXUser::export(undef, $strip); # for now return (1, @out); diff --git a/perl/DXUser.pm b/perl/DXUser.pm index 17a78f70..de55f1b6 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -272,32 +272,9 @@ sub get my $call = uc shift; my $data; - # is it in the LRU cache? my $ref = $u{$call} if exists $u{$call}; -# my $ref = $lru->get($call); return $ref if $ref && ref $ref eq 'DXUser'; - # search for it - # unless ($dbm->get($call, $data)) { - # eval { $ref = decode($data); }; - - # if ($ref) { - # if (!UNIVERSAL::isa($ref, 'DXUser')) { - # dbg("DXUser::get: got strange answer from decode of $call". ref $ref. " ignoring"); - # return undef; - # } - # # we have a reference and it *is* a DXUser - # } else { - # if ($@) { - # LogDbg('err', "DXUser::get decode error on $call '$@'"); - # } else { - # dbg("DXUser::get: no reference returned from decode of $call $!"); - # } - # return undef; - # } - # $lru->put($call, $ref); - # return $ref; - # } return undef; } @@ -466,7 +443,7 @@ sub export { my $name = shift; - my $fn = $name || "$main::local_data/user_json"; # force use of local_data + my $fn = $name || localdata("user_json"); # force use of local_data # save old ones move "$fn.oooo", "$fn.ooooo" if -e "$fn.oooo";