[whimsy] 02/02: move activity watchdog to a separate thread
This is an automated email from the ASF dual-hosted git repository. rubys pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/whimsy.git commit e5cf10dca152bbf14a59439640fedcf324d68fbc Author: Sam RubyAuthorDate: Mon Oct 17 08:33:21 2016 -0400 move activity watchdog to a separate thread --- www/board/agenda/daemon/wss.rb | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb index 8c07df0..acef407 100755 --- a/www/board/agenda/daemon/wss.rb +++ b/www/board/agenda/daemon/wss.rb @@ -73,7 +73,7 @@ end exit 0 if options.kill -# Restart when source file changes # +#Restart when source file changes or when inactive for an hour # def restart_process @@ -86,6 +86,16 @@ listener = Listen.to(__dir__) do |modified, added, removed| end listener.start +active = Time.now + +# restart once an hour when inactive +Thread.new do + loop do +sleep 90 +restart_process if Time.now - active >= 3600 + end +end + # Close all open connection on exit # @@ -108,14 +118,7 @@ if options.privkey and options.chain } end -active = Time.now - EM.run do - # restart once an hour when inactive - EM.add_periodic_timer(900) do -restart_process if Time.now - active >= 3600 - end - WebSocket::EventMachine::Server.start(server_options) do |ws| ws.onclose do Channel.delete ws @@ -144,6 +147,7 @@ EM.run do end end + # reset activity timer active = Time.now end end -- To stop receiving notification emails like this one, please contact "commits@whimsical.apache.org" .
[whimsy] 01/02: send private IPC privately; exclude board agenda changes
This is an automated email from the ASF dual-hosted git repository. rubys pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/whimsy.git commit 002f114a19e34e2ef53171ca3aca0d7168010263 Author: Sam RubyAuthorDate: Mon Oct 17 08:32:35 2016 -0400 send private IPC privately; exclude board agenda changes --- www/board/agenda/models/ipc.rb | 2 +- www/board/agenda/models/pending.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/www/board/agenda/models/ipc.rb b/www/board/agenda/models/ipc.rb index aea7e85..64e5e0f 100644 --- a/www/board/agenda/models/ipc.rb +++ b/www/board/agenda/models/ipc.rb @@ -17,7 +17,7 @@ module IPC done = false ws.on :open do if data[:private] -headers = "session: #{data[:private]}\n\n" +headers = "private: #{data[:private]}\n\n" else headers = '' end diff --git a/www/board/agenda/models/pending.rb b/www/board/agenda/models/pending.rb index 0bc5a22..bb5b98c 100644 --- a/www/board/agenda/models/pending.rb +++ b/www/board/agenda/models/pending.rb @@ -47,6 +47,7 @@ class Pending @@listener = Listen.to(AGENDA_WORK) do |modified, added, removed| modified.each do |path| next if path.end_with? '/sessions/present.yml' + next if path =~ /board_agenda_\d+_\d+_\d+.txt$/ next if File.exist?(path) and @@seen[path] == File.mtime(path) file = File.basename(path) if file =~ /^board_minutes_\d{4}_\d\d_\d\d\.yml$/ -- To stop receiving notification emails like this one, please contact "commits@whimsical.apache.org" .
[whimsy] branch master updated (72f6175 -> e5cf10d)
This is an automated email from the ASF dual-hosted git repository. rubys pushed a change to branch master in repository https://git-dual.apache.org/repos/asf/whimsy.git. from 72f6175 decouple service workers from events new 002f114 send private IPC privately; exclude board agenda changes new e5cf10d move activity watchdog to a separate thread The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: www/board/agenda/daemon/wss.rb | 20 www/board/agenda/models/ipc.rb | 2 +- www/board/agenda/models/pending.rb | 1 + 3 files changed, 14 insertions(+), 9 deletions(-) -- To stop receiving notification emails like this one, please contact ['"commits@whimsical.apache.org"'].
[whimsy] branch master updated: provide default subjects in responses
This is an automated email from the ASF dual-hosted git repository. rubys pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new c6f4965 provide default subjects in responses c6f4965 is described below commit c6f4965f9acd24c84eb289a4a6ce3963750153c0 Author: Sam RubyAuthorDate: Mon Oct 17 15:20:13 2016 -0400 provide default subjects in responses --- www/secmail/models/message.rb | 4 +++- www/secmail/views/actions/ccla.json.rb | 1 + www/secmail/views/actions/grant.json.rb | 1 + www/secmail/views/actions/icla.json.rb | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/www/secmail/models/message.rb b/www/secmail/models/message.rb index 56b7ae0..a0e2af1 100644 --- a/www/secmail/models/message.rb +++ b/www/secmail/models/message.rb @@ -220,8 +220,10 @@ class Message # fill in the subject from the original email if self.subject =~ /^re:\s/i mail.subject = self.subject -else +elsif self.subject mail.subject = 'Re: ' + self.subject +elsif fields[:subject] + mail.subject = fields[:subject] end # fill in the subject from the original email diff --git a/www/secmail/views/actions/ccla.json.rb b/www/secmail/views/actions/ccla.json.rb index 4f69339..3998c3b 100644 --- a/www/secmail/views/actions/ccla.json.rb +++ b/www/secmail/views/actions/ccla.json.rb @@ -114,6 +114,7 @@ end task "email #@email" do # build mail from template mail = message.reply( +subject: @document, from: @from, to: "#{@contact.inspect} <#{@email}>", cc: [ diff --git a/www/secmail/views/actions/grant.json.rb b/www/secmail/views/actions/grant.json.rb index 9c273aa..64e613c 100644 --- a/www/secmail/views/actions/grant.json.rb +++ b/www/secmail/views/actions/grant.json.rb @@ -105,6 +105,7 @@ end task "email #@email" do # build mail from template mail = message.reply( +subject: @document, from: @from, to: "#{@name.inspect} <#{@email}>", cc: [ diff --git a/www/secmail/views/actions/icla.json.rb b/www/secmail/views/actions/icla.json.rb index df6b52f..0b0d087 100644 --- a/www/secmail/views/actions/icla.json.rb +++ b/www/secmail/views/actions/icla.json.rb @@ -100,7 +100,7 @@ task "svn commit foundation/officers/iclas.txt" do svn 'diff', dest # commit changes -svn 'commit', dest, '-m', "ICLA from #{@pubname}" +svn 'commit', dest, '-m', "ICLA for #{@pubname}" end end @@ -127,6 +127,7 @@ task "email #@email" do # build mail from template mail = message.reply( +subject: "ICLA for #{@pubname}", from: @from, to: "#{@pubname.inspect} <#{@email}>", cc: [ -- To stop receiving notification emails like this one, please contact ['"commits@whimsical.apache.org" '].