Changeset 2820 for trunk/packages


Ignore:
Timestamp:
Dec 31, 2009, 3:16:46 PM (15 years ago)
Author:
broder
Message:

Since we're moving the queue entries into the queue directory for
atomicity, we need to inotify on both IN_CREATE and IN_MOVED_TO
events.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirtibuilder

    r2801 r2820  
    354354class Invirtibuilder(pyinotify.ProcessEvent):
    355355    """Process inotify triggers to build new packages."""
    356     def process_IN_CREATE(self, event):
    357         """Handle a created file or directory.
    358 
    359         When an IN_CREATE event comes in, trigger the builder.
     356    def process_default(self, event):
     357        """Handle an inotify event.
     358
     359        When an inotify event comes in, trigger the builder.
    360360        """
    361361        build()
     
    370370    notifier = pyinotify.Notifier(watch_manager, invirtibuilder)
    371371    watch_manager.add_watch(b._QUEUE_DIR,
    372                             pyinotify.EventsCodes.ALL_FLAGS['IN_CREATE'])
     372                            pyinotify.EventsCodes.ALL_FLAGS['IN_CREATE'] |
     373                            pyinotify.EventsCodes.ALL_FLAGS['IN_MOVED_TO'])
    373374
    374375    # Before inotifying, run any pending builds; otherwise we won't
Note: See TracChangeset for help on using the changeset viewer.