irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irodsReServer.cpp
Go to the documentation of this file.
1 #include "initServer.hpp"
3 #include "irods_delay_queue.hpp"
4 #include "irods_log.hpp"
5 #include "irods_query.hpp"
6 #include "irods_re_structs.hpp"
8 #include "irods_server_state.hpp"
9 #include "thread_pool.hpp"
10 #include "irodsReServer.hpp"
11 #include "miscServerFunct.hpp"
12 #include "query_processor.hpp"
13 #include "rodsClient.h"
14 #include "rodsPackTable.h"
15 #include "rsGlobalExtern.hpp"
16 #include "rsLog.hpp"
17 #include "ruleExecDel.h"
18 #include "ruleExecSubmit.h"
19 #include "connection_pool.hpp"
20 
21 #include <atomic>
22 #include <chrono>
23 #include <condition_variable>
24 #include <functional>
25 #include <thread>
26 
27 #include <boost/filesystem/convenience.hpp>
28 #include <boost/filesystem/operations.hpp>
29 #include <boost/format.hpp>
30 
31 namespace {
32  static std::atomic_bool re_server_terminated{};
33 
34  int init_log() {
35  /* Handle option to log sql commands */
36  auto sql_log_level = getenv(SP_LOG_SQL);
37  if(sql_log_level) {
38  int j{1};
39  #ifdef SYSLOG
40  j = atoi(sql_log_level);
41  #endif
42  rodsLogSqlReq(j);
43  }
44 
45  /* Set the logging level */
46  rodsLogLevel(LOG_NOTICE); /* default */
47  auto log_level = getenv(SP_LOG_LEVEL);
48  if (log_level) {
49  rodsLogLevel(std::atoi(log_level));
50  }
51 
52  #ifdef SYSLOG
53  /* Open a connection to syslog */
54  openlog("irodsDelayServer", LOG_ODELAY | LOG_PID, LOG_DAEMON);
55  #endif
56  int log_fd = logFileOpen(SERVER, nullptr, RULE_EXEC_LOGFILE);
57  if (log_fd >= 0) {
58  daemonize(SERVER, log_fd);
59  }
60  return log_fd;
61  }
62 
63  ruleExecSubmitInp_t fill_rule_exec_submit_inp(
64  const std::vector<std::string>& exec_info) {
65  namespace bfs = boost::filesystem;
66 
67  ruleExecSubmitInp_t rule_exec_submit_inp{};
68  rule_exec_submit_inp.packedReiAndArgBBuf = (bytesBuf_t*)malloc(sizeof(bytesBuf_t));
69 
70  const auto& rule_exec_id = exec_info[0].c_str();
71  const auto& rei_file_path = exec_info[2].c_str();
72  bfs::path p{rei_file_path};
73  if (!bfs::exists(p)) {
74  const int status{UNIX_FILE_STAT_ERR - errno};
75  THROW(status, (boost::format("stat error for rei file [%s], id [%s]") %
76  rei_file_path % rule_exec_id).str());
77  }
78 
79  rule_exec_submit_inp.packedReiAndArgBBuf->len = static_cast<int>(bfs::file_size(p));
80  rule_exec_submit_inp.packedReiAndArgBBuf->buf = malloc(rule_exec_submit_inp.packedReiAndArgBBuf->len + 1);
81 
82  int fd = open(rei_file_path, O_RDONLY, 0);
83  if (fd < 0) {
84  const int status{UNIX_FILE_STAT_ERR - errno};
85  THROW(status, (boost::format("open error for rei file [%s]") %
86  rei_file_path).str());
87  }
88 
89  memset(rule_exec_submit_inp.packedReiAndArgBBuf->buf, 0,
90  rule_exec_submit_inp.packedReiAndArgBBuf->len + 1);
91  ssize_t status{read(fd, rule_exec_submit_inp.packedReiAndArgBBuf->buf,
92  rule_exec_submit_inp.packedReiAndArgBBuf->len)};
93  close(fd);
94  if (rule_exec_submit_inp.packedReiAndArgBBuf->len != static_cast<int>(status)) {
95  if (status >= 0) {
96  THROW(SYS_COPY_LEN_ERR, (boost::format("read error for [%s],toRead [%d], read [%d]") %
97  rei_file_path % rule_exec_submit_inp.packedReiAndArgBBuf->len % status).str());
98  }
99  status = UNIX_FILE_READ_ERR - errno;
100  irods::log(LOG_ERROR, (boost::format("read error for file [%s], status = [%d]") %
101  rei_file_path % status).str());
102  }
103 
104  rstrcpy(rule_exec_submit_inp.ruleExecId, rule_exec_id, NAME_LEN);
105  rstrcpy(rule_exec_submit_inp.ruleName, exec_info[1].c_str(), META_STR_LEN);
106  rstrcpy(rule_exec_submit_inp.reiFilePath, rei_file_path, MAX_NAME_LEN);
107  rstrcpy(rule_exec_submit_inp.userName, exec_info[3].c_str(), NAME_LEN);
108  rstrcpy(rule_exec_submit_inp.exeAddress, exec_info[4].c_str(), NAME_LEN);
109  rstrcpy(rule_exec_submit_inp.exeTime, exec_info[5].c_str(), TIME_LEN);
110  rstrcpy(rule_exec_submit_inp.exeFrequency, exec_info[6].c_str(), NAME_LEN);
111  rstrcpy(rule_exec_submit_inp.priority, exec_info[7].c_str(), NAME_LEN);
112  rstrcpy(rule_exec_submit_inp.lastExecTime, exec_info[8].c_str(), NAME_LEN);
113  rstrcpy(rule_exec_submit_inp.exeStatus, exec_info[9].c_str(), NAME_LEN);
114  rstrcpy(rule_exec_submit_inp.estimateExeTime, exec_info[10].c_str(), NAME_LEN);
115  rstrcpy(rule_exec_submit_inp.notificationAddr, exec_info[11].c_str(), NAME_LEN);
116 
117  return rule_exec_submit_inp;
118  }
119 
120  int update_entry_for_repeat(
121  rcComm_t& _comm,
122  ruleExecSubmitInp_t& _inp,
123  int _exec_status) {
124  // Prepare input for rule exec mod
125  _exec_status = _exec_status > 0 ? 0 : _exec_status;
126 
127  // Prepare input for getting next repeat time
128  char current_time[NAME_LEN]{};
129  char* ef_string = _inp.exeFrequency;
130  char next_time[NAME_LEN]{};
131  snprintf(current_time, NAME_LEN, "%ld", std::time(nullptr));
132 
133  const auto delete_rule_exec_info{[&_comm, &_inp]() -> int {
134  ruleExecDelInp_t rule_exec_del_inp{};
135  rstrcpy(rule_exec_del_inp.ruleExecId, _inp.ruleExecId, NAME_LEN);
136  const int status = rcRuleExecDel(&_comm, &rule_exec_del_inp);
137  if (status < 0) {
138  irods::log(LOG_ERROR, (boost::format(
139  "%s:%d - rcRuleExecDel failed %d for id %s") %
140  __FUNCTION__ % __LINE__ % status % rule_exec_del_inp.ruleExecId).str());
141  }
142  return status;
143  }};
144 
145  const auto update_rule_exec_info = [&](const bool repeat_rule) -> int {
146  ruleExecModInp_t rule_exec_mod_inp{};
147  rstrcpy(rule_exec_mod_inp.ruleId, _inp.ruleExecId, NAME_LEN);
148 
149  addKeyVal(&rule_exec_mod_inp.condInput, RULE_LAST_EXE_TIME_KW, current_time);
150  addKeyVal(&rule_exec_mod_inp.condInput, RULE_EXE_TIME_KW, next_time);
151  if(repeat_rule) {
152  addKeyVal(&rule_exec_mod_inp.condInput, RULE_EXE_FREQUENCY_KW, ef_string);
153  }
154  const int status = rcRuleExecMod(&_comm, &rule_exec_mod_inp);
155  if (status < 0) {
156  irods::log(LOG_ERROR, (boost::format(
157  "%s:%d - rcRuleExecMod failed %d for id %s") %
158  __FUNCTION__ % __LINE__ % status % rule_exec_mod_inp.ruleId).str());
159  }
160  if (rule_exec_mod_inp.condInput.len > 0) {
161  clearKeyVal(&rule_exec_mod_inp.condInput);
162  }
163  return status;
164  };
165 
166  const int repeat_status = getNextRepeatTime(current_time, ef_string, next_time);
167  switch(repeat_status) {
168  case 0:
169  // Continue with given delay regardless of success
170  return update_rule_exec_info(false);
171  case 1:
172  // Remove if successful, otherwise update next exec time
173  return !_exec_status ? delete_rule_exec_info() : update_rule_exec_info(false);
174  case 2:
175  // Remove regardless of success
176  return delete_rule_exec_info();
177  case 3:
178  // Update with new exec time and frequency regardless of success
179  return update_rule_exec_info(true);
180  case 4:
181  // Delete if successful, otherwise update with new exec time and frequency
182  return !_exec_status ? delete_rule_exec_info() : update_rule_exec_info(true);
183  default:
184  irods::log(LOG_ERROR, (boost::format(
185  "%s:%d - getNextRepeatTime returned unknown value %d for id %s") %
186  __FUNCTION__ % __LINE__ % repeat_status % _inp.ruleExecId).str());
187  return repeat_status;
188  }
189  }
190 
191  exec_rule_expression_t pack_exec_rule_expression(
192  ruleExecSubmitInp_t& _inp) {
194 
195  int packed_rei_len = _inp.packedReiAndArgBBuf->len;
196  exec_rule.packed_rei_.len = packed_rei_len;
197  exec_rule.packed_rei_.buf = _inp.packedReiAndArgBBuf->buf;
198 
199  size_t rule_len = strlen(_inp.ruleName);
200  exec_rule.rule_text_.buf = (char*)malloc(rule_len+1);
201  exec_rule.rule_text_.len = rule_len+1;
202  rstrcpy( (char*)exec_rule.rule_text_.buf, _inp.ruleName, rule_len+1);
203  return exec_rule;
204  }
205 
206  int run_rule_exec(
207  rcComm_t& _comm,
208  ruleExecSubmitInp_t& _inp) {
209  // unpack the rei to get the user information
210  ruleExecInfoAndArg_t* rei_and_arg{};
211  int status = unpackStruct(
212  _inp.packedReiAndArgBBuf->buf,
213  (void**)&rei_and_arg,
214  "ReiAndArg_PI",
216  NATIVE_PROT);
217  if (status < 0) {
219  "[%s] - unpackStruct error. status [%d]",
220  __FUNCTION__, status );
221  return status;
222  }
223 
224  // set the proxy user from the rei before delegating to the agent
225  // following behavior from touchupPackedRei
226  _comm.proxyUser = *rei_and_arg->rei->uoic;
227 
228  exec_rule_expression_t exec_rule = pack_exec_rule_expression(_inp);
229  exec_rule.params_ = rei_and_arg->rei->msParamArray;
230  irods::at_scope_exit<std::function<void()>> at_scope_exit{[&exec_rule, &rei_and_arg] {
231  clearBBuf(&exec_rule.rule_text_);
232  if(rei_and_arg->rei) {
233  if(rei_and_arg->rei->rsComm) {
234  free(rei_and_arg->rei->rsComm);
235  }
236  freeRuleExecInfoStruct(rei_and_arg->rei, (FREE_MS_PARAM | FREE_DOINP));
237  }
238  free(rei_and_arg);
239  }};
240 
242  if (re_server_terminated) {
244  (boost::format("Rule [%s] completed with status [%d] but RE server was terminated.") %
245  _inp.ruleExecId % status).str());
246  }
247 
248  if (strlen(_inp.exeFrequency) > 0) {
249  return update_entry_for_repeat(_comm, _inp, status);
250  }
251  else if(status < 0) {
253  "ruleExec of %s: %s failed.",
254  _inp.ruleExecId, _inp.ruleName);
255  ruleExecDelInp_t rule_exec_del_inp{};
256  rstrcpy(rule_exec_del_inp.ruleExecId, _inp.ruleExecId, NAME_LEN);
257  status = rcRuleExecDel(&_comm, &rule_exec_del_inp);
258  if (status < 0) {
260  "rcRuleExecDel failed for %s, stat=%d",
261  _inp.ruleExecId, status);
262  // Establish a new connection as the original may be invalid
263  auto tmp_pool = irods::make_connection_pool();
264  status = rcRuleExecDel(&static_cast<rcComm_t&>(tmp_pool->get_connection()), &rule_exec_del_inp);
265  if (status < 0) {
267  (boost::format("rcRuleExecDel failed again for %s, stat=%d - exiting") %
268  _inp.ruleExecId % status).str());
269  }
270  }
271  return status;
272  }
273  else {
274  // Success - remove rule from catalog
275  ruleExecDelInp_t rule_exec_del_inp{};
276  rstrcpy(rule_exec_del_inp.ruleExecId, _inp.ruleExecId, NAME_LEN);
277  status = rcRuleExecDel(&_comm, &rule_exec_del_inp);
278  if(status < 0) {
279  rodsLog(LOG_ERROR, "Failed deleting rule exec %s from catalog", rule_exec_del_inp.ruleExecId);
280  }
281  return status;
282  }
283  }
284 
285  void execute_rule(
286  irods::delay_queue& queue,
287  const std::vector<std::string>& rule_info)
288  {
289  if (re_server_terminated) {
290  return;
291  }
292 
293  ruleExecSubmitInp_t rule_exec_submit_inp{};
294 
295  irods::at_scope_exit<std::function<void()>> at_scope_exit{[&rule_exec_submit_inp] {
296  freeBBuf(rule_exec_submit_inp.packedReiAndArgBBuf);
297  }};
298 
299  try{
300  rule_exec_submit_inp = fill_rule_exec_submit_inp(rule_info);
301  } catch(const irods::exception& e) {
302  irods::log(e);
303  return;
304  }
305 
306  try {
307  auto conn_pool = irods::make_connection_pool();
308  int status = run_rule_exec(conn_pool->get_connection(), rule_exec_submit_inp);
309  if(status < 0) {
310  rodsLog(LOG_ERROR, "Rule exec for [%s] failed. status = [%d]",
311  rule_exec_submit_inp.ruleExecId, status);
312  }
313  } catch(const std::exception& e) {
314  rodsLog(LOG_ERROR, "Exception caught during execution of rule [%s]: [%s]",
315  rule_exec_submit_inp.ruleExecId, e.what());
316  }
317 
318  if (!re_server_terminated) {
319  queue.dequeue_rule(std::string(rule_exec_submit_inp.ruleExecId));
320  }
321  }
322 
323  auto make_delay_queue_query_processor(
324  irods::thread_pool& thread_pool,
326  {
328  const auto now = std::to_string(std::time(nullptr));
329  const auto qstr = (boost::format(
330  "SELECT RULE_EXEC_ID, \
331  RULE_EXEC_NAME, \
332  RULE_EXEC_REI_FILE_PATH, \
333  RULE_EXEC_USER_NAME, \
334  RULE_EXEC_ADDRESS, \
335  RULE_EXEC_TIME, \
336  RULE_EXEC_FREQUENCY, \
337  RULE_EXEC_PRIORITY, \
338  RULE_EXEC_LAST_EXE_TIME, \
339  RULE_EXEC_STATUS, \
340  RULE_EXEC_ESTIMATED_EXE_TIME, \
341  RULE_EXEC_NOTIFICATION_ADDR \
342  WHERE RULE_EXEC_TIME <= '%s'") % now).str();
343  const auto job = [&](const result_row& result) -> void
344  {
345  const auto& rule_id = result[0];
346  if(queue.contains_rule_id(rule_id)) {
347  return;
348  }
350  (boost::format("Enqueueing rule [%s]")
351  % rule_id).str());
352  queue.enqueue_rule(rule_id);
353  irods::thread_pool::post(thread_pool, [&queue, result] {
354  execute_rule(queue, result);
355  });
356  };
357  return {qstr, job};
358  }
359 }
360 
361 int main() {
362  static std::condition_variable term_cv;
363  static std::mutex term_m;
364  const auto signal_exit_handler = [](int signal) {
365  rodsLog(LOG_NOTICE, "RE server received signal [%d]", signal);
366  re_server_terminated = true;
367  term_cv.notify_all();
368  };
369  signal(SIGINT, signal_exit_handler);
370  signal(SIGHUP, signal_exit_handler);
371  signal(SIGTERM, signal_exit_handler);
372  signal(SIGUSR1, signal_exit_handler);
373 
374  auto log_fd = init_log();
375  if(log_fd < 0) {
376  exit(log_fd);
377  }
378 
379  const auto sleep_time = [] {
380  int sleep_time = irods::default_re_server_sleep_time;
381  try {
382  sleep_time = irods::get_advanced_setting<const int>(irods::CFG_RE_SERVER_SLEEP_TIME);
383  } catch (const irods::exception& e) {
384  irods::log(e);
385  }
386  return sleep_time;
387  }();
388 
389  const auto go_to_sleep = [&sleep_time]() {
390  std::unique_lock<std::mutex> sleep_lock{term_m};
391  const auto until = std::chrono::system_clock::now() + std::chrono::seconds(sleep_time);
392  if (std::cv_status::no_timeout == term_cv.wait_until(sleep_lock, until)) {
393  irods::log(LOG_DEBUG, "RE server awoken by a notification");
394  }
395  };
396 
397  const auto thread_count = [] {
399  try {
400  thread_count = irods::get_advanced_setting<const int>(irods::CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS);
401  } catch (const irods::exception& e) {
402  irods::log(e);
403  }
404  return thread_count;
405  }();
406  irods::thread_pool thread_pool{thread_count};
407  irods::delay_queue queue;
408 
409  try {
410  while(!re_server_terminated) {
411  try {
412  auto delay_queue_processor = make_delay_queue_query_processor(thread_pool, queue);
413  auto query_conn_pool = irods::make_connection_pool();
414  auto query_conn = query_conn_pool->get_connection();
415  auto future = delay_queue_processor.execute(thread_pool, static_cast<rcComm_t&>(query_conn));
416  auto errors = future.get();
417  if(errors.size() > 0) {
418  for(const auto& [code, msg] : errors) {
420  (boost::format("executing delayed rule failed - [%d]::[%s]")
421  % code
422  % msg).str());
423  }
424  }
425  } catch(const std::exception& e) {
426  irods::log(LOG_ERROR, e.what());
427  } catch(const irods::exception& e) {
428  irods::log(e);
429  }
430  go_to_sleep();
431  }
432  } catch(const irods::exception& e) {
433  irods::log(e);
434  }
435  irods::log(LOG_NOTICE, "RE server exiting...");
436 }
ruleExecSubmitInp_t::packedReiAndArgBBuf
bytesBuf_t * packedReiAndArgBBuf
Definition: ruleExecSubmit.h:34
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
RULE_LAST_EXE_TIME_KW
#define RULE_LAST_EXE_TIME_KW
Definition: rodsKeyWdDef.h:217
logFileOpen
int logFileOpen(int runMode, const char *logDir, const char *logFileName)
Definition: initServer.cpp:796
rcComm_t
Definition: rcConnect.h:95
irods::at_scope_exit
Definition: irods_at_scope_exit.hpp:10
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
irods_server_properties.hpp
THROW
#define THROW(_code, _msg)
Definition: irods_exception.hpp:68
rsLog.hpp
irods::CFG_RE_SERVER_SLEEP_TIME
const std::string CFG_RE_SERVER_SLEEP_TIME("rule_engine_server_sleep_time_in_seconds")
BytesBuf::buf
void * buf
Definition: rodsDef.h:199
rcRuleExecMod
int rcRuleExecMod(rcComm_t *conn, ruleExecModInp_t *ruleExecModInp)
Definition: rcRuleExecMod.cpp:32
rcComm_t::proxyUser
userInfo_t proxyUser
Definition: rcConnect.h:103
SERVER
#define SERVER
Definition: rodsConnect.h:59
connection_pool.hpp
rodsLogSqlReq
void rodsLogSqlReq(int onOrOff)
Definition: rodsLog.cpp:352
rodsPackTable.h
irods_delay_queue.hpp
irods::experimental::administration::client::v1::exists
auto exists(rcComm_t &conn, const user &user) -> bool
Definition: user_administration.cpp:359
pid_age.p
p
Definition: pid_age.py:13
unpackStruct
int unpackStruct(const void *inPackStr, void **outStruct, const char *packInstName, const packInstruct_t *myPackTable, irodsProt_t irodsProt)
Definition: packStruct.cpp:63
RULE_EXE_TIME_KW
#define RULE_EXE_TIME_KW
Definition: rodsKeyWdDef.h:212
irods::thread_pool::post
static void post(thread_pool &_pool, Function &&_func)
Definition: thread_pool.hpp:35
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
FREE_MS_PARAM
#define FREE_MS_PARAM
Definition: irods_re_structs.hpp:15
ruleExecDel.h
irodsReServer.hpp
irods_query.hpp
freeRuleExecInfoStruct
int freeRuleExecInfoStruct(ruleExecInfo_t *rs, int freeSpecialStructFlag)
Definition: reStruct.cpp:100
BytesBuf::len
int len
Definition: rodsDef.h:198
irods::default_re_server_sleep_time
constexpr int default_re_server_sleep_time
Definition: irodsReServer.hpp:5
RULE_EXEC_LOGFILE
#define RULE_EXEC_LOGFILE
Definition: rsLog.hpp:13
getNextRepeatTime
int getNextRepeatTime(char *currTime, char *delayStr, char *nextTime)
Definition: rcMisc.cpp:1768
rsGlobalExtern.hpp
irods::query_processor
Definition: query_processor.hpp:20
SYS_COPY_LEN_ERR
@ SYS_COPY_LEN_ERR
Definition: rodsErrorTable.h:95
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
irods::delay_queue
Definition: irods_delay_queue.hpp:7
META_STR_LEN
#define META_STR_LEN
Definition: rodsDef.h:65
ruleExecSubmit.h
TIME_LEN
#define TIME_LEN
Definition: rodsDef.h:54
query_processor.hpp
exec_rule
irods::error exec_rule(irods::default_re_ctx &, const std::string &_rn, std::list< boost::any > &_ps, irods::callback _eff_hdlr)
Definition: libirods_rule_engine_plugin-cpp_default_policy.cpp:910
SP_LOG_SQL
#define SP_LOG_SQL
Definition: rodsDef.h:264
ruleExecModInp_t
Definition: ruleExecMod.h:8
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
irods::query_processor::result_row
typename query< ConnectionType >::value_type result_row
Definition: query_processor.hpp:25
exec_rule_expression_t
Definition: exec_rule_expression.h:9
irods::CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS
const std::string CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS("maximum_number_of_concurrent_rule_engine_server_processes")
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
RULE_EXE_FREQUENCY_KW
#define RULE_EXE_FREQUENCY_KW
Definition: rodsKeyWdDef.h:213
main
int main()
Definition: irodsReServer.cpp:361
RuleExecInfoAndArg
Definition: irods_re_structs.hpp:46
irods::log
void log(const error &)
Definition: irods_log.cpp:13
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
FREE_DOINP
#define FREE_DOINP
Definition: irods_re_structs.hpp:16
RodsPackTable
const packInstruct_t RodsPackTable[]
Definition: rodsPackTable.h:61
BytesBuf
Definition: rodsDef.h:197
daemonize
void daemonize(int runMode, int logFd)
Definition: initServer.cpp:762
miscServerFunct.hpp
rcRuleExecDel
int rcRuleExecDel(rcComm_t *conn, ruleExecDelInp_t *ruleExecDelInp)
Definition: rcRuleExecDel.cpp:35
rodsLogLevel
void rodsLogLevel(int level)
Definition: rodsLog.cpp:339
irods::make_connection_pool
std::shared_ptr< connection_pool > make_connection_pool(int size=1)
Definition: connection_pool.cpp:223
ruleExecSubmitInp_t
Definition: ruleExecSubmit.h:21
SP_LOG_LEVEL
#define SP_LOG_LEVEL
Definition: rodsDef.h:265
irods::delay_queue::enqueue_rule
void enqueue_rule(const std::string &rule_id)
Definition: irods_delay_queue.hpp:19
UNIX_FILE_READ_ERR
@ UNIX_FILE_READ_ERR
Definition: rodsErrorTable.h:302
rodsClient.h
irods::thread_pool
Definition: thread_pool.hpp:11
irods_server_state.hpp
rcExecRuleExpression
int rcExecRuleExpression(rcComm_t *, exec_rule_expression_t *)
Definition: rcExecRuleExpression.cpp:6
irods_re_structs.hpp
ruleExecSubmitInp_t::ruleExecId
char ruleExecId[64]
Definition: ruleExecSubmit.h:35
irods_at_scope_exit.hpp
irods::exception
Definition: irods_exception.hpp:15
NATIVE_PROT
@ NATIVE_PROT
Definition: rodsDef.h:148
initServer.hpp
irods::delay_queue::contains_rule_id
bool contains_rule_id(const std::string &_rule_id)
Definition: irods_delay_queue.hpp:13
freeBBuf
int freeBBuf(bytesBuf_t *myBBuf)
Definition: rcMisc.cpp:88
UNIX_FILE_STAT_ERR
@ UNIX_FILE_STAT_ERR
Definition: rodsErrorTable.h:306
irods::delay_queue::dequeue_rule
void dequeue_rule(const std::string &rule_id)
Definition: irods_delay_queue.hpp:24
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
thread_pool.hpp
clearBBuf
int clearBBuf(bytesBuf_t *myBBuf)
Definition: rcMisc.cpp:101
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
clearKeyVal
int clearKeyVal(keyValPair_t *condInput)
Definition: rcMisc.cpp:1047
ruleExecDelInp_t
Definition: ruleExecDel.h:7
ruleExecSubmitInp_t::ruleName
char ruleName[(1024 *20)]
Definition: ruleExecSubmit.h:22
irods::default_max_number_of_concurrent_re_threads
constexpr int default_max_number_of_concurrent_re_threads
Definition: irodsReServer.hpp:6
irods_log.hpp
ruleExecSubmitInp_t::exeFrequency
char exeFrequency[64]
Definition: ruleExecSubmit.h:27