mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-21 15:41:19 +01:00
Last thing for job migration
This commit is contained in:
parent
3eed42cfaa
commit
401a6d8780
@ -71,6 +71,7 @@ public class ConfigManager {
|
|||||||
private final Set<YmlMaker> jobFiles = new HashSet<>();
|
private final Set<YmlMaker> jobFiles = new HashSet<>();
|
||||||
|
|
||||||
public static final String exampleJobName = "_EXAMPLE";
|
public static final String exampleJobName = "_EXAMPLE";
|
||||||
|
public static final String exampleJobInternalName = "exampleJob";
|
||||||
|
|
||||||
public ConfigManager() {
|
public ConfigManager() {
|
||||||
this.jobFile = new File(Jobs.getFolder(), "jobConfig.yml");
|
this.jobFile = new File(Jobs.getFolder(), "jobConfig.yml");
|
||||||
@ -704,7 +705,7 @@ public class ConfigManager {
|
|||||||
|
|
||||||
if (jobFiles.isEmpty()) {
|
if (jobFiles.isEmpty()) {
|
||||||
File[] files = jobsPathFolder.listFiles((dir, name) -> name.toLowerCase().endsWith(".yml")
|
File[] files = jobsPathFolder.listFiles((dir, name) -> name.toLowerCase().endsWith(".yml")
|
||||||
&& !name.toLowerCase().equalsIgnoreCase(exampleJobName));
|
&& !name.toLowerCase().equalsIgnoreCase(exampleJobName + ".yml"));
|
||||||
if (files != null) {
|
if (files != null) {
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
jobFiles.add(new YmlMaker(jobsPathFolder, file));
|
jobFiles.add(new YmlMaker(jobsPathFolder, file));
|
||||||
@ -738,7 +739,7 @@ public class ConfigManager {
|
|||||||
|
|
||||||
for (String jobKey : jobsSection.getKeys(false)) {
|
for (String jobKey : jobsSection.getKeys(false)) {
|
||||||
// Ignore example job
|
// Ignore example job
|
||||||
if (jobKey.equalsIgnoreCase(exampleJobName)) {
|
if (jobKey.equalsIgnoreCase(exampleJobInternalName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user