WebKit Bugzilla
Attachment 356393 Details for
Bug 192241
: [ews-app] Run BugzillaPatchFetcher periodically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-ews-app-Run-BugzillaPatchFetcher-periodically.patch (text/plain), 3.39 KB, created by
Aakash Jain
on 2018-12-03 12:29:17 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2018-12-03 12:29:17 PST
Size:
3.39 KB
patch
obsolete
>From 84cace06db949a3d75fd23e6f13f829f09629a7d Mon Sep 17 00:00:00 2001 >From: Aakash Jain <aakash_jain@apple.com> >Date: Mon, 3 Dec 2018 12:27:02 -0800 >Subject: [PATCH] [ews-app] Run BugzillaPatchFetcher periodically > https://bugs.webkit.org/show_bug.cgi?id=192241 > >Reviewed by NOBODY (OOPS!). > >* BuildSlaveSupport/ews-app/ews/__init__.py: >* BuildSlaveSupport/ews-app/ews/apps.py: >(EwsConfig.ready): This method is called by Django on startup. >* BuildSlaveSupport/ews-app/ews/fetcher.py: >(FetchLoop): Class which invokes BugzillaPatchFetcher every 60s. >--- > Tools/BuildSlaveSupport/ews-app/ews/__init__.py | 2 ++ > Tools/BuildSlaveSupport/ews-app/ews/apps.py | 4 ++++ > Tools/BuildSlaveSupport/ews-app/ews/fetcher.py | 15 +++++++++++++++ > Tools/ChangeLog | 13 +++++++++++++ > 4 files changed, 34 insertions(+) > >diff --git a/Tools/BuildSlaveSupport/ews-app/ews/__init__.py b/Tools/BuildSlaveSupport/ews-app/ews/__init__.py >index 7f9b9ce243b..fbccd87671a 100644 >--- a/Tools/BuildSlaveSupport/ews-app/ews/__init__.py >+++ b/Tools/BuildSlaveSupport/ews-app/ews/__init__.py >@@ -1,3 +1,5 @@ > import logging > > logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(message)s') >+ >+default_app_config = 'ews.apps.EwsConfig' >diff --git a/Tools/BuildSlaveSupport/ews-app/ews/apps.py b/Tools/BuildSlaveSupport/ews-app/ews/apps.py >index 5ac62302e23..5d3d848cdbc 100644 >--- a/Tools/BuildSlaveSupport/ews-app/ews/apps.py >+++ b/Tools/BuildSlaveSupport/ews-app/ews/apps.py >@@ -27,3 +27,7 @@ from django.apps import AppConfig > > class EwsConfig(AppConfig): > name = 'ews' >+ >+ def ready(self): >+ from ews.fetcher import FetchLoop >+ FetchLoop() >diff --git a/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py b/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py >index 53cbe83f458..76b16109d60 100644 >--- a/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py >+++ b/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py >@@ -21,6 +21,8 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > import logging >+import threading >+import time > > from ews.common.bugzilla import Bugzilla > from ews.common.buildbot import Buildbot >@@ -29,6 +31,19 @@ from ews.models.patch import Patch > _log = logging.getLogger(__name__) > > >+class FetchLoop(): >+ def __init__(self, interval=60): >+ self.interval = interval >+ thread = threading.Thread(target=self.run, args=()) >+ thread.daemon = True >+ thread.start() >+ >+ def run(self): >+ while True: >+ BugzillaPatchFetcher().fetch() >+ time.sleep(self.interval) >+ >+ > class BugzillaPatchFetcher(): > isRunning = False > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 17f5d797847..dd26cf5d4e6 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-03 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-app] Run BugzillaPatchFetcher periodically >+ https://bugs.webkit.org/show_bug.cgi?id=192241 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-app/ews/__init__.py: >+ * BuildSlaveSupport/ews-app/ews/apps.py: >+ (EwsConfig.ready): This method is called by Django on startup. >+ * BuildSlaveSupport/ews-app/ews/fetcher.py: >+ (FetchLoop): Class which invokes BugzillaPatchFetcher every 60s. >+ > 2018-11-30 Aakash Jain <aakash_jain@apple.com> > > [ews-app] Ensure only one instance of BugzillaPatchFetcher is running >-- >2.17.2 (Apple Git-113) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
lforschler
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192241
: 356393