Skip to content

Instantly share code, notes, and snippets.

View piyush0101's full-sized avatar

Piyush Srivastava piyush0101

  • DigitalOcean
  • Portland, OR
View GitHub Profile
@piyush0101
piyush0101 / gist:5e233995879f1a73b38ab73d9c5f457c
Created November 15, 2018 21:56
Offloading contrail-schema CPU intensive tasks to a gipc child process
@@ -1,6 +1,6 @@
import socket
import gevent
+import gipc
import cStringIO
from pprint import pformat
@@ -19,7 +19,6 @@ class VncAmqpHandle(object):
self.q_name_prefix = q_name_prefix
self._db_resync_done = gevent.event.Event()
goroutine 430187 [syscall, 137 minutes]:
syscall.Syscall6(0x3d, 0x3b47, 0xc8222a7d94, 0x0, 0xc822507a70, 0x0, 0x0, 0x0, 0x4703b0, 0x7f5f2de4a028)
/usr/local/go/src/syscall/asm_linux_amd64.s:44 +0x5
syscall.wait4(0x3b47, 0xc8222a7d94, 0x0, 0xc822507a70, 0x90, 0x0, 0x0)
/usr/local/go/src/syscall/zsyscall_linux_amd64.go:172 +0x7f
syscall.Wait4(0x3b47, 0xc8222a7ddc, 0x0, 0xc822507a70, 0xf467e0, 0x0, 0x0)
/usr/local/go/src/syscall/syscall_linux.go:256 +0x55
os.(*Process).wait(0xc822775580, 0x509a1c, 0x0, 0x0)
/usr/local/go/src/os/exec_unix.go:22 +0x105
Using public TSA key from environment.
Using private worker key from environment.
{"timestamp":"1468613418.367889643","source":"worker","message":"worker.garden.unpack-assets.unpacking","log_level":1,"data":{"session":"1.1"}}
{"timestamp":"1468613423.881664515","source":"worker","message":"worker.garden.unpack-assets.done","log_level":1,"data":{"session":"1.1"}}
{"timestamp":"1468613423.882001400","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"archive","session":"1.2.1"}}
{"timestamp":"1468613424.163156509","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"bosh-deployment","session":"1.2.2"}}
{"timestamp":"1468613424.580854177","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"bosh-io-release","session":"1.2.3"}}
{"timestamp":"1468613424.773968697","source":"worker","message":"worker.garden.extract-r
---
- job:
name: project-py-build
description: >
Run unit tests and build project package
This job is managed by jenkins-job-builder. Changes made through
the web interface will be lost!
node: "big-slave"
display-name: "Build Project Application"
triggers:
package GoJava;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
import os
import re
with open('sept record.csv', 'r') as records:
minutes = 0.0
for line in records:
match = re.search("(\d+):(\d+)", line)
if match:
duration = int(match.group(1)) * 60 + int(match.group(2))
minutes += duration
#!/usr/bin/perl
@failed_tests=('Coverage-vector-9.coverage',
'Coverage-vector-10.coverage',
'Coverage-vector-11.coverage');
@passed_tests=('Coverage-vector-7.coverage',
'Coverage-vector-8.coverage');
@failed_keys=('gamma', 'alpha');
from unittest import TestCase
from pecan import conf
import requests
class UpdateDataTest(TestCase):
def test_should_store_data_in_datastore(self):
conf.update({"db": {"url": "mim://localhost:27017/collection"}})
service = "service"
public class AbstractTweetService {
protected List<Tweet> tweets;
public AbstractTweetService(TweetDownloaderHelper downloaderHelper) {
tweets = downloaderHelper.downloadTweets();
}
public void persistTweets(String user, int numberOfTweets) {
TweetPersister.persistTweets();
public class AbstractTweetService {
protected List<Tweet> tweets;
public AbstractTweetService() {
tweets = TweetDownloader.downloadTweets();
}
public void persistTweets(String user, int numberOfTweets) {
TweetPersister.persistTweets();