@@ -25,7 +25,7 @@ namespace Flux {
2525namespace resource_model {
2626namespace detail {
2727
28- int reapi_module_t::match_allocate (void *h, const char *cmd ,
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,6 +36,7 @@ int reapi_module_t::match_allocate (void *h, const char *cmd,
3636 flux_future_t *f = NULL ;
3737 const char *rset = NULL ;
3838 const char *status = NULL ;
39+ const char *cmd = match_op_to_string (match_op);
3940
4041 if (!fh || jobspec == " " || jobid > INT64_MAX) {
4142 errno = EINVAL;
@@ -73,10 +74,10 @@ int reapi_module_t::match_allocate (void *h, bool orelse_reserve,
7374 const uint64_t jobid, bool &reserved,
7475 std::string &R, int64_t &at, double &ov)
7576{
76- const char *cmd = (orelse_reserve)? " allocate_orelse_reserve "
77- : " allocate_with_satisfiability " ;
77+ match_op_t match_op = (orelse_reserve)? match_op_t ::MATCH_ALLOCATE_ORELSE_RESERVE
78+ : match_op_t ::MATCH_ALLOCATE_W_SATISFIABILITY ;
7879
79- return match_allocate (h, cmd , jobspec, jobid, reserved, R, at, ov);
80+ return match_allocate (h, match_op , jobspec, jobid, reserved, R, at, ov);
8081
8182}
8283
@@ -111,13 +112,14 @@ void match_allocate_multi_cont (flux_future_t *f, void *arg)
111112}
112113
113114int reapi_module_t::match_allocate_multi (void *h,
114- const char *cmd ,
115+ match_op_t match_op ,
115116 const char *jobs,
116117 queue_adapter_base_t *adapter)
117118{
118119 int rc = -1 ;
119120 flux_t *fh = static_cast <flux_t *> (h);
120121 flux_future_t *f = nullptr ;
122+ const char *cmd = match_op_to_string (match_op);
121123
122124 if (!fh) {
123125 errno = EINVAL;
@@ -147,9 +149,10 @@ int reapi_module_t::match_allocate_multi (void *h,
147149 const char *jobs,
148150 queue_adapter_base_t *adapter)
149151{
150- const char *cmd = orelse_reserve ? " allocate_orelse_reserve"
151- : " allocate_with_satisfiability" ;
152- return match_allocate_multi (h, cmd, jobs, adapter);
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);
153156}
154157
155158int reapi_module_t::update_allocate (void *h, const uint64_t jobid,
0 commit comments