Skip to content

Commit 89ddcaf

Browse files
authored
[cuebot] Only replace username once on PostJobs (#2088)
When a post job is created by the JobSpec, its username is replaced by "monitor", but the logic replace all occurrences of the username, when just the first is expected to change: ``` Original Job: show_shot_user1_rest_of_the_name_for_user1 Previous Post Job name: show_shot_monitor_rest_of_the_name_for_monitor New Post Job name: show_shot_monitor_rest_of_the_name_for_user1 ```
1 parent 7a15bed commit 89ddcaf

File tree

1 file changed

+1
-1
lines changed
  • cuebot/src/main/java/com/imageworks/spcue/service

1 file changed

+1
-1
lines changed

cuebot/src/main/java/com/imageworks/spcue/service/JobSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ private BuildableJob initPostJob(BuildableJob parent) {
937937

938938
JobDetail job = new JobDetail();
939939
job.name = parent.detail.name + "_post_job_" + System.currentTimeMillis();
940-
job.name = job.name.replace(user, "monitor");
940+
job.name = job.name.replaceFirst(user, "monitor");
941941
job.state = JobState.STARTUP;
942942
job.isPaused = false;
943943
job.maxCoreUnits = 500;

0 commit comments

Comments
 (0)