Skip to content

Commit 8e1ebf4

Browse files
committed
feat: task account_chain
1 parent f5d2076 commit 8e1ebf4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

internal/cacctmgr/CmdArgParser.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ func init() {
537537
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxJobsPerUser, "max-jobs-per-user", "J", math.MaxUint32, "Set the maximum number of jobs per user")
538538
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxJobsPerAccount, "max-jobs-per-account", "j", math.MaxUint32, "Set the maximum number of jobs per account")
539539
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxCpusPerUser, "max-cpus-per-user", "c", math.MaxUint32, "Set the maximum number of CPUs per user")
540-
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerUser, "max-submit-jobs-per-user", "s", math.MaxUint32, "Set the maximum number of submit jobs per user")
541-
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerAccount, "max-submit-jobs-per-account", "S", math.MaxUint32, "Set the maximum number of submit jobs per account")
540+
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerUser, "max-submit-jobs-per-user", "S", math.MaxUint32, "Set the maximum number of submit jobs per user")
541+
addQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerAccount, "max-submit-jobs-per-account", "s", math.MaxUint32, "Set the maximum number of submit jobs per account")
542542
addQosCmd.Flags().Uint64VarP(&FlagQos.MaxTimeLimitPerTask, "max-time-limit-per-task", "T", util.MaxJobTimeLimit, "Set the maximum time limit per job (in seconds)")
543543
if err := addQosCmd.MarkFlagRequired("name"); err != nil {
544544
log.Fatalln("Can't mark 'name' flag required")
@@ -653,8 +653,8 @@ func init() {
653653
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxJobsPerUser, "max-jobs-per-user", "J", math.MaxUint32, "Set the maximum number of jobs per user")
654654
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxJobsPerAccount, "max-jobs-per-account", "j", math.MaxUint32, "Set the maximum number of jobs per account")
655655
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxCpusPerUser, "max-cpus-per-user", "c", math.MaxUint32, "Set the maximum number of CPUs per user")
656-
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerUser, "max-submit-jobs-per-user", "s", math.MaxUint32, "Set the maximum number of submit jobs per user")
657-
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerAccount, "max-submit-jobs-per-account", "S", math.MaxUint32, "Set the maximum number of submit jobs per account")
656+
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerUser, "max-submit-jobs-per-user", "S", math.MaxUint32, "Set the maximum number of submit jobs per user")
657+
modifyQosCmd.Flags().Uint32VarP(&FlagQos.MaxSubmitJobsPerAccount, "max-submit-jobs-per-account", "s", math.MaxUint32, "Set the maximum number of submit jobs per account")
658658
modifyQosCmd.Flags().Uint64VarP(&FlagQos.MaxTimeLimitPerTask, "max-time-limit-per-task", "T", util.MaxJobTimeLimit, "Set the maximum time limit per job (in seconds)")
659659

660660
// Rules

internal/util/err.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ var errMsgMap = map[protos.ErrCode]string{
120120
protos.ErrCode_ERR_NOT_IN_ALLOWED_LIST: "The account does not have permission to run jobs in this partition. Please contact the administrator to add it to the allowed list",
121121
protos.ErrCode_ERR_IN_DENIED_LIST: "The account has been denied access to this partition. Please contact the security administrator if access is required",
122122
protos.ErrCode_ERR_MAX_JOB_COUNT_PER_ACCOUNT: "The number of tasks for the current account has reached its limit",
123+
protos.ErrCode_ERR_USER_HAS_TASK: "The user has jobs pending or running, cannot be deleted",
123124
}
124125

125126
func ErrMsg(err_code protos.ErrCode) string {

protos/PublicDefs.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ enum ErrCode {
478478
ERR_EBPF = 69;
479479
ERR_SUPERVISOR = 70;
480480
ERR_MAX_JOB_COUNT_PER_ACCOUNT = 71;
481+
ERR_USER_HAS_TASK = 72;
481482
}
482483

483484
enum EntityType {

0 commit comments

Comments
 (0)