whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: get delivery working again
Date Tue, 12 Jun 2018 12:03:40 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 666c8b2  get delivery working again
666c8b2 is described below

commit 666c8b2e9e666d58f01ad9c195967d11add4bf9d
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Jun 12 08:03:15 2018 -0400

    get delivery working again
---
 www/board/agenda/daemon/channel.rb | 8 +++++---
 www/board/agenda/daemon/events.rb  | 4 +---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb
index e507d2c..cf0ea15 100644
--- a/www/board/agenda/daemon/channel.rb
+++ b/www/board/agenda/daemon/channel.rb
@@ -104,7 +104,7 @@ class Channel
 
   # listen for changes to pending and minutes files
   work_listener = Listen.to(Session::AGENDA_WORK) do |modified, added, removed|
-    modified.each do |path|
+    (modified+added).each do |path|
       next if path.end_with? '/sessions/present.yml'
       next unless File.exist?(path)
       file = File.basename(path)
@@ -119,10 +119,12 @@ class Channel
       elsif file =~ /^(\w+)\.yml$/
         self.post_private $1, type: :pending, private: $1,
           value: YAML.load_file(path)
-      elsif path =~ /^\/events\/\w+$/
+      elsif path =~ /\/events\/\w+$/
         Events.process()
+      elsif file =~ /^board_agenda_\d{4}_\d\d_\d\d\-chat.yml$/
+        nil
       else
-        STDERR.puts file
+        STDERR.puts path
       end
     end
   end
diff --git a/www/board/agenda/daemon/events.rb b/www/board/agenda/daemon/events.rb
index 20a755d..7aa9000 100644
--- a/www/board/agenda/daemon/events.rb
+++ b/www/board/agenda/daemon/events.rb
@@ -24,6 +24,7 @@ class Events
 
   # capture a message to be sent
   def self.post(message)
+    FileUtils.mkdir_p WORKDIR
     filename = SecureRandom.hex(16)
     File.write(File.join(WORKDIR, filename), JSON.generate(message))
   end
@@ -43,7 +44,4 @@ class Events
       end
     end
   end
-
-  # ensure the working directory exists
-  FileUtils.mkdir_p WORKDIR
 end

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.

Mime
View raw message