Skip to content

Commit 5a949b1

Browse files
committed
feat: task account_chain
1 parent f79ce84 commit 5a949b1

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
@@ -108,6 +108,7 @@ var errMsgMap = map[protos.ErrCode]string{
108108
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",
109109
protos.ErrCode_ERR_IN_DENIED_LIST: "The account has been denied access to this partition. Please contact the security administrator if access is required",
110110
protos.ErrCode_ERR_MAX_JOB_COUNT_PER_ACCOUNT: "The number of tasks for the current account has reached its limit",
111+
protos.ErrCode_ERR_USER_HAS_TASK: "The user has jobs pending or running, cannot be deleted",
111112
}
112113

113114
func ErrMsg(err_code protos.ErrCode) string {

protos/PublicDefs.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ enum ErrCode {
451451
ERR_EBPF = 69;
452452
ERR_SUPERVISOR = 70;
453453
ERR_MAX_JOB_COUNT_PER_ACCOUNT = 71;
454+
ERR_USER_HAS_TASK = 72;
454455
}
455456

456457
enum EntityType {

0 commit comments

Comments
 (0)