forked from ansible/awx
-
Notifications
You must be signed in to change notification settings - Fork 0
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 ansible#5239 from AlanCoding/migration_cache
Reduce API response times by 30% by using memcache migration flag Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
- Loading branch information
Showing
5 changed files
with
50 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
from django.apps import AppConfig | ||
from django.db.models.signals import pre_migrate | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
|
||
def raise_migration_flag(**kwargs): | ||
from awx.main.tasks import set_migration_flag | ||
set_migration_flag.delay() | ||
|
||
|
||
class MainConfig(AppConfig): | ||
|
||
name = 'awx.main' | ||
verbose_name = _('Main') | ||
|
||
def ready(self): | ||
pre_migrate.connect(raise_migration_flag, sender=self) |
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