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 reflect = promise => | |
promise.then( | |
solved => ({value: solved, status: "Resolved"}), | |
rejected => ({value: rejected, status: "Rejected"}) | |
); | |
let promises = [ | |
new Promise((resolve, reject) => setTimeout(() => { console.log("finish",1), resolve(1)}, 400)), | |
new Promise((resolve, reject) => setTimeout(() => { console.log("finish",2), resolve(2)}, 394)), |
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
# I'm using this script for a 64-bit Linux Environment running Puma with Ruby 2.3 version. | |
# I have tested that the Sidekiq server stops and restarts by handling the USR1 and TERM signals while deploying an app, rebooting an instance and while restarting the app server. | |
# Below are the steps to include this script in the EB instance and start sidekiq server on deployment. | |
## Include this file inside the .ebextensions folder in the application directory. | |
## Set up the sidekiq.yml(sidekiq concurrency, queues and other settings) file inside the config folder in the application directory. | |
## Make sure sidekiq pid file path and sidekiq log file path SHOULD NOT be specified in the above sidekiq.yml file.(only when using this script on EB instance) | |
## Set the RAILS_ENV variable in the EB configuration. | |
## Deploy the application to the EB instance. | |
## ssh into the instance and search if sidekiq is running. ( ps aux | grep sidekiq ) | |
## Once this script is added to the EB instance, add the .ebextensions/sideki |