Commit Graph

13 Commits

Author SHA1 Message Date
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Christie Rice
f844681913 Revert "BOM-2368: pyupgrade in LMS Directory (#26649)"
This reverts commit fc06846cb0.
2021-02-23 15:29:49 -05:00
M. Zulqarnain
fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05:00
M. Zulqarnain
d9b9f21e22 pylint amnesty in LMS root (#26276) 2021-02-02 12:52:24 +05:00
Tim McCormack
0c57a02119 Enforce a Celery singleton across cms and lms by using shared module (#25840)
This should prevent the issues we've seen recently where cms modules are
imported by the running lms process, resulting in two celery instances
being created and tasks intermittently being registered to the wrong
instance (and therefore effectively lost.)

In commit ab6bf348d4/PR #25822 we tried to ensure that only one or the
other of the instances was created by adding a startup check.
Unfortunately, there's an external shared library that refers directly
to the lms celery, causing a startup failure in cms, so we had to revert
it. Rather than waiting to fix that library, this commit collapses
the two instances together so that there is only ever one.
2020-12-10 17:54:31 +00:00
Tim McCormack
a9bcf22169 Revert "Only instantiate one celery app per process." 2020-12-10 14:14:42 +00:00
Feanil Patel
ab6bf348d4 Only instantiate one celery app per process.
Ticket: BOM-2086

Currently there are parts of the LMS that import content from the CMS
APP and vice-versa.  When this happens, we end up with 2 instances of
the celery app and some tasks get registered to the wrong one. The
tasks that were getting registered to the wrong one are never able to
run and result in lots of production errors on celery workers.

The timing of the CMS celery app instantiation is non deterministic
so different tasks get lost depending on when it's imported by some
code in the LMS.

As long as SERVICE_VARIANT is set, this code should prevent the
instantiation of both celery apps.
2020-12-09 14:13:40 -05:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
David Ormsbee
294bbe7fe0 Test speedup: Monkey patch Kombu entrypoints fn.
We monkey patch Kombu's entrypoints listing because scanning through
this accounts for the majority of LMS/Studio startup time for tests,
and we don't use custom Kombu serializers (which is what this is for).
Still, this is pretty evil, and should be taken out when we update
Celery to the next version where it looks like this method of custom
serialization has been removed.

FWIW, this is identical behavior to what happens in Kombu if
pkg_resources isn't available.
2017-03-14 13:45:40 -04:00
Feanil Patel
6289b190d9 Fix pep8 and pylint. 2015-05-08 09:01:50 -04:00
Feanil Patel
34df5a32d2 Get LMS tests passing. 2015-05-08 09:01:48 -04:00
Calen Pennington
5ba03130aa Moving LMS code into subdirectory 2012-06-06 14:09:01 -04:00