-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1033 from linea-it/develop
V0.18
- Loading branch information
Showing
42 changed files
with
944 additions
and
248 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,15 +1,21 @@ | ||
# from __future__ import absolute_import, unicode_literals | ||
# | ||
# from celery import task | ||
# | ||
# @task(name="test") | ||
# def test(): | ||
# """ | ||
# | ||
# """ | ||
# print("----------- TESTE ----------------") | ||
# # from statistics.general_statistics import GeneralStatistics | ||
# #from statistics.models import Statistics | ||
# from common.models import * | ||
# | ||
# print(Filter.objects.count()) | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from celery import task | ||
from celery.decorators import periodic_task | ||
from celery.task.schedules import crontab | ||
|
||
from django.conf import settings | ||
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Garbage Colector %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # | ||
@periodic_task( | ||
run_every=(crontab(minute='*/30')), | ||
#run_every=10.0, | ||
name="garbage_colector", | ||
ignore_result=True | ||
) | ||
def garbage_colector(): | ||
""" | ||
Executa rotinas de limpesa | ||
""" | ||
# Limpar os produtos | ||
from product.garbagecolector import GarbageColectorProduct | ||
GarbageColectorProduct().purge_products_expiration_time() |
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
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
Oops, something went wrong.