Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 175381 Details for
Bug 252127
mailman wakes up 7 times a second when idle
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
New patch -- tested only briefly
mailman-2.1.9-inotify-new.patch (text/plain), 2.07 KB, created by
Tomas Smetana
on 2007-08-28 09:07:51 UTC
(
hide
)
Description:
New patch -- tested only briefly
Filename:
MIME Type:
Creator:
Tomas Smetana
Created:
2007-08-28 09:07:51 UTC
Size:
2.07 KB
patch
obsolete
>--- mailman-2.1.9/Mailman/Queue/Runner.py.inotify 2006-07-22 03:53:41.000000000 +0200 >+++ mailman-2.1.9/Mailman/Queue/Runner.py 2007-08-27 15:37:43.000000000 +0200 >@@ -34,12 +34,26 @@ > > import email.Errors > >+ > try: > True, False > except NameError: > True = 1 > False = 0 > >+with_inotify = True >+try: >+ from pyinotify import WatchManager >+ from pyinotify import Notifier >+ from pyinotify import ProcessEvent >+ from pyinotify import EventsCodes >+ >+ class RunnerEventHandler(ProcessEvent): >+ def process_IN_CREATE(self, event): >+ return >+ >+except ImportError: >+ with_inotify = False > > > class Runner: >@@ -54,17 +68,27 @@ > # Create the shunt switchboard > self._shunt = Switchboard(mm_cfg.SHUNTQUEUE_DIR) > self._stop = False >+ if with_inotify: >+ # Register inotify monitor >+ self._watchmanager = WatchManager() >+ self._eventprocessor = RunnerEventHandler() >+ self._notifier = Notifier(self._watchmanager, self._eventprocessor) > > def __repr__(self): > return '<%s at %s>' % (self.__class__.__name__, id(self)) > > def stop(self): >+ if with_inotify: >+ self._notifier.stop() > self._stop = True > > def run(self): > # Start the main loop for this queue runner. > try: > try: >+ if with_inotify: >+ # Watch for new files in QDIR >+ self._watchmanager.add_watch(self.QDIR, EventsCodes.IN_CREATE) > while True: > # Once through the loop that processes all the files in > # the queue directory. >@@ -247,7 +271,11 @@ > """ > if filecnt or self.SLEEPTIME <= 0: > return >- time.sleep(self.SLEEPTIME) >+ if with_inotify: >+ while (not self._notifier.check_events()) and (not self._stop): >+ time.sleep(self.SLEEPTIME) >+ else: >+ time.sleep(self.SLEEPTIME) > > def _shortcircuit(self): > """Return a true value if the individual file processing loop should
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
Actions:
View
|
Diff
Attachments on
bug 252127
:
161856
| 175381 |
177381