This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BunnyBus = require('bunnybus'); | |
| const bunnyBus = new BunnyBus(); | |
| bunnyBus.publish({ | |
| event : 'message-created', | |
| body : 'hello world' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BunnyBus = require('bunnybus'); | |
| const bunnyBus = new BunnyBus(); | |
| const handlersForQueue1 = { | |
| 'message_created' : (message, ack) => { | |
| //do some work! | |
| ack(); | |
| }, | |
| // set up more route key and handlers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const someCallBackFunction = require('some-module'); | |
| const someCallBackAsync = function (data) { | |
| return Promise((resolve, reject) => { | |
| someCallBackAsync(data, (err, result) => { | |
| if(err) { | |
| reject(err); | |
| } | |
| else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Promise = require('bluebird'); | |
| const request = require('superagent'); | |
| const getXYZandABCResults = function() { | |
| const self = this; | |
| const task1 = request.get('http://www.xyz.com'); | |
| const task2 = request.get('http://www.abc.com'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| host,path,protocol | |
| qa-no-services.theknot.com,/local-partners/api/identity/identities/search,https | |
| geo-api.xogrp.com,/geo/locations/market/%s,http | |
| qa-no-services.theknot.com,/local-partners/tkpintegration/createtoken/%s,https | |
| qa-no-services.theknot.com,/local-partners/api/identity/identities/search,https | |
| qa-no-services.theknot.com,/local-partners/api/conversation/conversations/message,https | |
| qa-no-services.theknot.com,/local-partners/api/conversation-theknot/conversations/message,https | |
| qa-no-services.theknot.com,/local-partners/api/conversation-theknot/conversations/message,https | |
| qa-no-services.theknot.com,/local-partners/api/identity/identities/search,https | |
| qa-no-services.theknot.com,/local-partners/api/conversation/conversations/messages/,https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name,version | |
| xo-ds-handler,4.3.0 | |
| xo-request,2.4.1 | |
| xo-rabbit,6.8.0 | |
| xo-logger,0.4.6 | |
| xo-error,1.0.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name,version,environment | |
| service-app-auth,1.4.1,qa | |
| service-bi-api,0.0.1,qa | |
| service-conversation-api,14.10.1,qa | |
| service-conversation-bride-indexer,2.8.7,qa | |
| service-conversation-indexer,5.6.1,qa | |
| service-conversation-mail-api,4.0.2,qa | |
| service-conversation-planner-api,17.12.1,qa | |
| service-conversation-theknot-api,18.12.1,qa | |
| service-conversation-vendor-indexer,2.8.7,qa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export PATH=/usr/local/bin:$PATH | |
| files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
| pass=true | |
| if [ "$files" = "" ]; then | |
| exit 0 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #install the curator cli | |
| pip install elasticsearch-curator | |
| #output the existing crontab | |
| crontab -l > crontab.bak | |
| echo "16 1 * * * /usr/local/bin/curator --host 127.0.0.1 delete indices --older-than 4 --time-unit days --prefix .marvel- --timestring '\%Y.\%m.\%d'" >> crontab.bak | |
| crontab crontab.bak | |
| rm crontab.bak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # perform a rolling restart of all data/master nodes in a stable cluster | |
| # | |
| # args: [elasticsearch-host:port] | |
| # | |
| set -e | |
| set -u |