mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat: Re-compute the given items cost job.
feat: Optimize the architecture.
This commit is contained in:
17
server/src/loaders/jobs.ts
Normal file
17
server/src/loaders/jobs.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import Agenda from 'agenda';
|
||||
import WelcomeEmailJob from '@/Jobs/welcomeEmail';
|
||||
import ComputeItemCost from '@/Jobs/ComputeItemCost';
|
||||
|
||||
export default ({ agenda }: { agenda: Agenda }) => {
|
||||
agenda.define(
|
||||
'welcome-email',
|
||||
{ priority: 'high' },
|
||||
new WelcomeEmailJob().handler,
|
||||
);
|
||||
agenda.define(
|
||||
'compute-item-cost',
|
||||
{ priority: 'high' },
|
||||
new ComputeItemCost().handler,
|
||||
);
|
||||
agenda.start();
|
||||
};
|
||||
Reference in New Issue
Block a user