Skip to content

Commit

Permalink
Update ID generation in job store entities
Browse files Browse the repository at this point in the history
Changed ID generation for PausedTriggerGroup and PausedJobGroup by adding 'G' to the formatted string. Also, modified the access modifier of GetId method in Job class to private. In addition, added a new rule - 'MemberCanBePrivate.Global' - to qodana.yaml for code quality checks.
  • Loading branch information
JezhikLaas committed Dec 18, 2023
1 parent a0753ee commit 8154ad1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Quartz.Impl.RavenJobStore/Entities/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Job(IJobDetail? job, string schedulerInstanceName)
RequestsRecovery = job.RequestsRecovery;
}

public static string GetId(string scheduler, string group, string name) =>
private static string GetId(string scheduler, string group, string name) =>
$"J{scheduler}/{group}/{name}";

[JsonProperty]
Expand Down
2 changes: 1 addition & 1 deletion Quartz.Impl.RavenJobStore/Entities/PausedJobGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal PausedJobGroup(string scheduler, string group)
}

public static string GetId(string scheduler, string group) =>
$"J{scheduler}#{group}";
$"JG{scheduler}#{group}";

[JsonProperty]
public string Id { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Quartz.Impl.RavenJobStore/Entities/PausedTriggerGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal PausedTriggerGroup(string scheduler, string group)
}

public static string GetId(string scheduler, string group) =>
$"T{scheduler}#{group}";
$"TG{scheduler}#{group}";

[JsonProperty]
public string Id { get; set; }
Expand Down
1 change: 1 addition & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ include:
- name: MemberCanBeMadeStatic.Global
- name: MemberCanBeMadeStatic.Local
- name: UnusedParameter.Global
- name: MemberCanBePrivate.Global

0 comments on commit 8154ad1

Please sign in to comment.