@@ -25,7 +25,7 @@ namespace Flux {
2525namespace resource_model {
2626namespace detail {
2727
28- int reapi_module_t::match_allocate (void *h, bool orelse_reserve ,
28+ int reapi_module_t::match_allocate (void *h, match_op_t match_op ,
2929 const std::string &jobspec,
3030 const uint64_t jobid, bool &reserved,
3131 std::string &R, int64_t &at, double &ov)
@@ -36,8 +36,7 @@ int reapi_module_t::match_allocate (void *h, bool orelse_reserve,
3636 flux_future_t *f = NULL ;
3737 const char *rset = NULL ;
3838 const char *status = NULL ;
39- const char *cmd = (orelse_reserve)? " allocate_orelse_reserve"
40- : " allocate_with_satisfiability" ;
39+ const char *cmd = match_op_to_string (match_op);
4140
4241 if (!fh || jobspec == " " || jobid > INT64_MAX) {
4342 errno = EINVAL;
@@ -70,6 +69,18 @@ int reapi_module_t::match_allocate (void *h, bool orelse_reserve,
7069 return rc;
7170}
7271
72+ int reapi_module_t::match_allocate (void *h, bool orelse_reserve,
73+ const std::string &jobspec,
74+ const uint64_t jobid, bool &reserved,
75+ std::string &R, int64_t &at, double &ov)
76+ {
77+ match_op_t match_op = (orelse_reserve)? match_op_t ::MATCH_ALLOCATE_ORELSE_RESERVE
78+ : match_op_t ::MATCH_ALLOCATE_W_SATISFIABILITY;
79+
80+ return match_allocate (h, match_op, jobspec, jobid, reserved, R, at, ov);
81+
82+ }
83+
7384void match_allocate_multi_cont (flux_future_t *f, void *arg)
7485{
7586 int64_t rj = -1 ;
@@ -101,16 +112,15 @@ void match_allocate_multi_cont (flux_future_t *f, void *arg)
101112}
102113
103114int reapi_module_t::match_allocate_multi (void *h,
104- bool orelse_reserve ,
115+ match_op_t match_op ,
105116 const char *jobs,
106117 queue_adapter_base_t *adapter)
107118{
108119 int rc = -1 ;
109120 flux_t *fh = static_cast <flux_t *> (h);
110121 flux_future_t *f = nullptr ;
122+ const char *cmd = match_op_to_string (match_op);
111123
112- const char *cmd = orelse_reserve ? " allocate_orelse_reserve"
113- : " allocate_with_satisfiability" ;
114124 if (!fh) {
115125 errno = EINVAL;
116126 goto error;
@@ -134,6 +144,17 @@ int reapi_module_t::match_allocate_multi (void *h,
134144 return rc;
135145}
136146
147+ int reapi_module_t::match_allocate_multi (void *h,
148+ bool orelse_reserve,
149+ const char *jobs,
150+ queue_adapter_base_t *adapter)
151+ {
152+ match_op_t match_op = (orelse_reserve)? match_op_t ::MATCH_ALLOCATE_ORELSE_RESERVE
153+ : match_op_t ::MATCH_ALLOCATE_W_SATISFIABILITY;
154+
155+ return match_allocate_multi (h, match_op, jobs, adapter);
156+ }
157+
137158int reapi_module_t::update_allocate (void *h, const uint64_t jobid,
138159 const std::string &R, int64_t &at,
139160 double &ov, std::string &R_out)
0 commit comments