Build cron for data seed demo (#4142)
* Migrate command to cron * Put back command using job as well * Build service and module + move into folder --------- Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
co-authored by
Thomas Trompette
parent
a2eca16646
commit
b1eb0577bc
+16
@@ -0,0 +1,16 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { MessageQueueJob } from 'src/integrations/message-queue/interfaces/message-queue-job.interface';
|
||||
|
||||
import { DataSeedDemoWorkspaceService } from 'src/database/commands/data-seed-demo-workspace/services/data-seed-demo-workspace.service';
|
||||
|
||||
@Injectable()
|
||||
export class DataSeedDemoWorkspaceJob implements MessageQueueJob<undefined> {
|
||||
constructor(
|
||||
private readonly dataSeedDemoWorkspaceService: DataSeedDemoWorkspaceService,
|
||||
) {}
|
||||
|
||||
async handle(): Promise<void> {
|
||||
await this.dataSeedDemoWorkspaceService.seedDemo();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user