Skip to content

Commit

Permalink
fix: add recognize jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Aug 7, 2024
1 parent 81995dc commit 0025dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/server/src/loaders/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { PaymentReceiveMailNotificationJob } from '@/services/Sales/PaymentRecei
import { PlaidFetchTransactionsJob } from '@/services/Banking/Plaid/PlaidFetchTransactionsJob';
import { ImportDeleteExpiredFilesJobs } from '@/services/Import/jobs/ImportDeleteExpiredFilesJob';
import { SendVerifyMailJob } from '@/services/Authentication/jobs/SendVerifyMailJob';
import { RegonizeTransactionsJob } from '@/services/Banking/RegonizeTranasctions/RecognizeTransactionsJob';
import { ReregonizeTransactionsJob } from '@/services/Banking/RegonizeTranasctions/jobs/RerecognizeTransactionsJob';
import { RegonizeTransactionsJob } from '@/services/Banking/RegonizeTranasctions/jobs/RecognizeTransactionsJob';
import { RevertRegonizeTransactionsJob } from '@/services/Banking/RegonizeTranasctions/jobs/RevertRecognizedTransactionsJob';

export default ({ agenda }: { agenda: Agenda }) => {
new ResetPasswordMailJob(agenda);
Expand All @@ -31,6 +33,8 @@ export default ({ agenda }: { agenda: Agenda }) => {
new ImportDeleteExpiredFilesJobs(agenda);
new SendVerifyMailJob(agenda);
new RegonizeTransactionsJob(agenda);
new ReregonizeTransactionsJob(agenda);
new RevertRegonizeTransactionsJob(agenda);

agenda.start().then(() => {
agenda.every('1 hours', 'delete-expired-imported-files', {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RevertRecognizedTransactions {
q.whereNotNull('recognizedTransaction.id');

if (rulesIds.length > 0) {
q.where('recognizedTransaction.bankRuleId', rulesIds);
q.whereIn('recognizedTransaction.bankRuleId', rulesIds);
}
if (transactionsCriteria?.accountId) {
q.where('accountId', transactionsCriteria.accountId);
Expand Down

0 comments on commit 0025dcf

Please sign in to comment.