35
35
#include < iterator>
36
36
#include < algorithm>
37
37
#include < typeinfo>
38
+ #include < stdexcept>
38
39
39
40
// =-=-=-=-=-=-=-
40
41
// boost includes
@@ -415,19 +416,9 @@ namespace {
415
416
if (auto * p = getValByKey ( &obj_inp->condInput , FORCE_FLAG_KW); p != 0 ) { rm_force_kw = p; }
416
417
indices_for_rm_coll = get_indices_for_delete_by_query (*_rei->rsComm , obj_inp->objPath , false );
417
418
}
418
- else if (// "pep_api_mod_access_control_pre" == _rn ||
419
- " pep_api_mod_access_control_post" == _rn ) {
420
-
419
+ else if (" pep_api_mod_access_control_post" == _rn ) {
421
420
irods::indexing::indexer idx{_rei, config->instance_name_ };
422
-
423
- auto it = _args.begin ();std::ostringstream s;
424
- /*
425
- for (const auto & i :_args) {
426
- s << i.type().name() << " dwm\n";
427
- }
428
-
429
- rodsLog(LOG_NOTICE,"DWM: %s ---> %s",_rn.c_str(),s.str().c_str());
430
- */
421
+ auto it = _args.begin ();
431
422
std::advance (it, 2 );
432
423
if (_args.end () == it) {
433
424
THROW (
@@ -437,39 +428,31 @@ namespace {
437
428
try {
438
429
const auto * access_ctl = boost::any_cast<modAccessControlInp_t*>(*it);
439
430
if (access_ctl) {
440
- const auto &[recursive,level,userN,zone,logical_path] = *access_ctl;
441
- s << " recurs " << recursive <<" "
442
- << " accessLvl " <<level<<" "
443
- << " userName " <<userN<<" "
444
- << " zone " <<zone<<" "
445
- << " path " <<logical_path<<" \n " ;
446
- rodsLog (LOG_NOTICE," DWM: --- %s" ,s.str ().c_str ());
447
- // dwm-
431
+ const auto &[recursive, level_, userN_, zone_, logical_path] = *access_ctl;
432
+
448
433
namespace fsvr = irods::experimental::filesystem::server;
449
434
if (recursive && fsvr::is_collection (*_rei->rsComm ,logical_path)) {
450
435
idx.schedule_collection_operation (
451
436
irods::indexing::operation_type::index ,
452
437
logical_path,
453
438
_rei->rsComm ->clientUser .userName
454
- , " ::metadata" // value // DWM -> Empty fields for index_name , index_type ,
455
- , " " // units // DWM and index technology will signal that the collection
456
- ); // operation should search upward in hierarchy for indexing tags
439
+ , " ::metadata" // value // -> Empty fields for index_name , index_type ,
440
+ , " " // units // and index technology will signal that the collection
441
+ ); // operation should search upward in hierarchy for indexing tags
457
442
}
458
443
else {
459
444
idx.schedule_metadata_indexing_event (
460
445
logical_path,
461
446
_rei->rsComm ->clientUser .userName ,
462
- " null" // attribute,
447
+ " null" // attribute,
463
448
" bb" // value,
464
449
" cc" // units
465
- );
450
+ );
466
451
}
467
452
}
468
453
}
469
- catch (...){
470
- rodsLog (LOG_NOTICE," DWM: **- pep_api_data_obj_unlink_post **- ERROR" );
471
- }
472
- rodsLog (LOG_NOTICE," DWM: --- %s ---" ,_rn.c_str ());
454
+ catch (const std::exception &e){ const char * message = e.what ();
455
+ rodsLog (LOG_NOTICE," Exception during pep_api_data_obj_unlink_post: %s" ,message); }
473
456
}
474
457
else if (" pep_api_data_obj_unlink_post" == _rn) {
475
458
auto it = _args.begin ();
@@ -579,7 +562,7 @@ namespace {
579
562
const auto & pre_map = atomic_metadata_tuples[ " pre" ];
580
563
set_symmetric_difference ( pre_map.begin (), pre_map.end (),
581
564
map.cbegin (), map.cend (), std::back_inserter (avus_added_or_removed));
582
- // dwm-
565
+
583
566
for (const auto & [attribute, value, units] : avus_added_or_removed) {
584
567
if (attribute != config->index ) {
585
568
irods::indexing::indexer idx{_rei, config->instance_name_ };
0 commit comments