Subversion Repositories SmartDukaan

Rev

Rev 36552 | Rev 37040 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36552 Rev 36993
Line 16... Line 16...
16
import org.springframework.stereotype.Component;
16
import org.springframework.stereotype.Component;
17
 
17
 
18
import java.time.LocalDate;
18
import java.time.LocalDate;
19
import java.time.LocalDateTime;
19
import java.time.LocalDateTime;
20
import java.time.LocalTime;
20
import java.time.LocalTime;
-
 
21
import java.time.YearMonth;
21
import java.util.Date;
22
import java.util.Date;
22
import java.util.LinkedHashMap;
23
import java.util.LinkedHashMap;
23
 
24
 
24
@Component
25
@Component
25
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
26
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
Line 126... Line 127...
126
        propertiesDetails.put("sendPartnerInvestmentDetails", "1");
127
        propertiesDetails.put("sendPartnerInvestmentDetails", "1");
127
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
128
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
128
 
129
 
129
    }
130
    }
130
 
131
 
-
 
132
    // Monthly margins CN dry-run at 06:00 on the 1st. dryRun=true forces the harmless dev path
-
 
133
    // (no IRN, no PDF, no DB persist, no partner mail) even on prod. The real pipeline is run
-
 
134
    // manually via `--sendCreditNote --live`.
-
 
135
    @Scheduled(cron = "0 0 6 1 * ?")
-
 
136
    public void monthlyMarginsCnDryRun() throws Exception {
-
 
137
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
-
 
138
        propertiesDetails.put("monthlyMarginsCnDryRun", "0");
-
 
139
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
-
 
140
 
-
 
141
        scheduledTasks.sendCreditNote(YearMonth.now().minusMonths(1), true);
-
 
142
 
-
 
143
        propertiesDetails.put("monthlyMarginsCnDryRun", "1");
-
 
144
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
-
 
145
    }
-
 
146
 
131
    @Scheduled(cron = "0 30 6 * * *")
147
    @Scheduled(cron = "0 30 6 * * *")
132
    public void generateBiReport() throws Exception {
148
    public void generateBiReport() throws Exception {
133
        scheduledTasksTest.generateBiReport();
149
        scheduledTasksTest.generateBiReport();
134
    }
150
    }
135
    @Scheduled(cron = "0 30 4 * * *")
151
    @Scheduled(cron = "0 30 4 * * *")