This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
''' | ||
Module for tasks to be sent on task queue | ||
''' | ||
from celery import task | ||
|
||
from app.worker.app_celery import AppTask | ||
# from celery import task | ||
from reboot.celery import app | ||
|
||
from .create_receipt import Receiptor | ||
|
||
|
||
@task(bind=True, base=AppTask) | ||
@app.task(bind=True, base=AppTask) | ||
def receiptor(self, queryset, total_count): | ||
receiptor = Receiptor(queryset, total_count) | ||
return receiptor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
""" | ||
Module for csv file importers to be sent to queue | ||
""" | ||
from celery import task | ||
# from celery import task | ||
|
||
from app.worker.app_celery import AppTask | ||
from reboot.celery import app | ||
|
||
from .historical_data_importer import HistoricalDataImporter | ||
|
||
|
||
@task(bind=True, base=AppTask) | ||
@app.task(bind=True, base=AppTask) | ||
def historical_data_importer(self, csvpath): | ||
importer = HistoricalDataImporter(csvpath) | ||
importer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters