feat(server): wip syncing Plaid transactions

This commit is contained in:
Ahmed Bouhuolia
2024-02-02 02:23:49 +02:00
parent b43cd26ecc
commit b940c6dd17
15 changed files with 491 additions and 7 deletions

View File

@@ -0,0 +1,29 @@
import Container, { Service } from 'typedi';
@Service()
export class PlaidFetchTransactionsJob {
/**
* Constructor method.
*/
constructor(agenda) {
agenda.define(
'plaid-update-account-transactions',
{ priority: 'high', concurrency: 2 },
this.handler
);
}
/**
* Triggers the function.
*/
private handler = async (job, done: Function) => {
const {} = job.attrs.data;
try {
done();
} catch (error) {
console.log(error);
done(error);
}
};
}