This is an automated email from the ASF dual-hosted git repository.
sebb 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 42c6040 Add temp debug to detect stalling
42c6040 is described below
commit 42c60401d3a801bcf50faf27f79a28305148a60e
Author: Sebb <[email protected]>
AuthorDate: Sat Jul 18 22:31:20 2020 +0100
Add temp debug to detect stalling
---
tools/pubsub2rake.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/pubsub2rake.rb b/tools/pubsub2rake.rb
index d8d300c..8ccdadb 100755
--- a/tools/pubsub2rake.rb
+++ b/tools/pubsub2rake.rb
@@ -10,6 +10,9 @@ require 'whimsy/asf/svn'
class PubSub
+ require 'fileutils'
+ ALIVE = "/tmp/#{File.basename(__FILE__)}.alive" # TESTING ONLY
+
@restartable = false
@updated = false
def self.listen(url, creds, options={})
@@ -27,6 +30,7 @@ class PubSub
http.request request do |response|
body = ''
response.read_body do |chunk|
+ FileUtils.touch(ALIVE) # Temporary debug
body += chunk
# All chunks are terminated with \n. Since 2070 can split events
into 64kb sub-chunks
# we wait till we have gotten a newline, before trying to parse
the JSON.