Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77641


Change subject: Remove receiver.py, has been moved to gerrit-to-redis project
......................................................................

Remove receiver.py, has been moved to gerrit-to-redis project

The gerrit-to-redis project needs renaming at some point in
the future.

Change-Id: I6ad89fad935b49be0eafea86a5312298b63eea4c
---
D suchabot/receiver.py
1 file changed, 0 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/SuchABot 
refs/changes/41/77641/1

diff --git a/suchabot/receiver.py b/suchabot/receiver.py
deleted file mode 100755
index 0a721fc..0000000
--- a/suchabot/receiver.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/python
-import cgi
-import cgitb
-import json
-import os
-import pipes
-import subprocess
-import logging
-
-cgitb.enable()
-
-#fix the path issues
-environ = os.environ
-environ['PATH'] = '/bin:/usr/bin:/usr/local/bin'
-
-form = cgi.FieldStorage()
-payload = json.loads(form['payload'].value)
-repo = payload['repository']['name']
-number = str(payload['number'])
-action = payload['action']
-
-logging.basicConfig(format='%%(asctime)s %s PR#%s %s %%(message)s' % (repo, 
number, action), filename=os.path.expanduser('~/logs/%s.receive' % repo), 
level=logging.INFO)
-
-logging.info('received')
-if action == 'closed' or action == 'reopened':
-    #FIXME: In the future, this should probably abandon the Gerrit patch
-    logging.info('ignored')
-else:
-    output = subprocess.check_output('/usr/local/bin/jsub'
-                                    ' -N suchabot'
-                                    ' -o 
/data/project/suchaserver/suchabot.out'
-                                    ' -e 
/data/project/suchaserver/suchabot.err'
-                                    ' -mem 512M 
/data/project/suchaserver/code/SuchABot/suchabot/sync.bash'
-                                    ' {0} {1}'.format(pipes.quote(repo), 
pipes.quote(number)),
-                                    stderr=subprocess.STDOUT, shell=True, 
env=environ)
-
-    # Sortof potentially hopefully stable way to get the job id.
-    # valhallasw says it should be okay....
-    jobid = output.split('\n')[1].split(' ')[2]
-
-    logging.info("queued job %s", jobid)
-print 'HTTP/1.0 200 OK'
-print

-- 
To view, visit https://gerrit.wikimedia.org/r/77641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ad89fad935b49be0eafea86a5312298b63eea4c
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/SuchABot
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to