mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Concurrency control items cost compute.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Agenda from 'agenda';
|
||||
import WelcomeEmailJob from '@/Jobs/welcomeEmail';
|
||||
import ComputeItemCost from '@/Jobs/ComputeItemCost';
|
||||
import RewriteInvoicesJournalEntries from '@/jobs/writeInvoicesJEntries';
|
||||
|
||||
export default ({ agenda }: { agenda: Agenda }) => {
|
||||
agenda.define(
|
||||
@@ -10,8 +11,13 @@ export default ({ agenda }: { agenda: Agenda }) => {
|
||||
);
|
||||
agenda.define(
|
||||
'compute-item-cost',
|
||||
{ priority: 'high' },
|
||||
{ priority: 'high', concurrency: 20 },
|
||||
new ComputeItemCost().handler,
|
||||
);
|
||||
agenda.define(
|
||||
'rewrite-invoices-journal-entries',
|
||||
{ priority: 'normal', concurrency: 1, },
|
||||
new RewriteInvoicesJournalEntries().handler,
|
||||
);
|
||||
agenda.start();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user