Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions backend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ spec:
template:
metadata:
annotations:
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/minScale: "0"
autoscaling.knative.dev/maxScale: "5"
run.googleapis.com/cpu-throttling: "true"
run.googleapis.com/startup-cpu-boost: "true"
spec:
timeoutSeconds: 300
containers:
Expand All @@ -25,7 +27,7 @@ spec:
value: "prod"

- name: JAVA_TOOL_OPTIONS
value: "-Xms256m -Xmx512m -XX:+UseG1GC -XX:+ExitOnOutOfMemoryError"
value: "-Xms256m -Xmx512m -XX:+UseSerialGC -XX:+ExitOnOutOfMemoryError"

- name: JDBC_URL
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;

import org.springframework.stereotype.Service;

import jakarta.mail.MessagingException;
Expand All @@ -29,7 +29,6 @@ public class EmailService {
@Value("${email.sender_name}")
private String fromName;

@Async("taskExecutor")
public void sendResetEmail(String to, String token) {
try {
MimeMessage message = mailSender.createMimeMessage();
Expand Down Expand Up @@ -70,7 +69,6 @@ public void sendResetEmail(String to, String token) {
}
}

@Async("taskExecutor")
public void sendForwardingHelper(String to, String code, String link) {
try {
MimeMessage message = mailSender.createMimeMessage();
Expand Down Expand Up @@ -107,7 +105,6 @@ public void sendForwardingHelper(String to, String code, String link) {
}
}

@Async("taskExecutor")
public void sendVerificationEmail(String to, String token) {
try {
MimeMessage message = mailSender.createMimeMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Caching;
import org.springframework.scheduling.annotation.Async;

import org.springframework.stereotype.Service;
import org.springframework.web.client.RestClient;

Expand Down Expand Up @@ -122,7 +122,6 @@ public void connectAndSetupPush(String authCode, String email) throws Exception
log.info("User {} successfully connected Gmail. Watch set with label ID: {}", email, labelId);
}

@Async("taskExecutor")
public void initiateManualSync(String email) {

LocalDateTime now = LocalDateTime.now();
Expand Down Expand Up @@ -340,7 +339,6 @@ public void disconnectGmail(String email) {
cleanupGoogleResourcesAsync(refreshToken, labelId);
}

@Async("taskExecutor")
protected void cleanupGoogleResourcesAsync(String refreshToken, String labelId) {
try {
String accessToken = getFreshAccessToken(refreshToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;

import org.springframework.stereotype.Service;

import java.math.BigInteger;
Expand Down Expand Up @@ -49,7 +49,6 @@ public GmailWebhookService(GeminiService geminiService, JobService jobService, U
this.cacheEvictService = cacheEvictService;
}

@Async("taskExecutor")
public void processHistorySync(String userEmail) {
final String email = userEmail.toLowerCase();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.thughari.jobtrackerpro.interfaces.GeminiService;
import com.thughari.jobtrackerpro.repo.UserRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand All @@ -23,7 +23,6 @@ public IngestionService(GeminiService geminiService, JobService jobService, User
this.userRepository = userRepository;
}

@Async("taskExecutor")
@Transactional
public void handleManualForward(String from, String subject, String body, String userEmail) {
User user = userRepository.findByEmail(userEmail).orElse(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Caching;
import org.springframework.scheduling.annotation.Async;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down Expand Up @@ -115,7 +115,6 @@ public DeletionWarning checkPendingDeletion(String email) {
* Ensures complete cleanup across all systems
*/
@Transactional
@Async
public void deleteUserCompletely(String email) {

User user = userRepository.findByEmail(email)
Expand Down
Loading