Skip to content

Instantly share code, notes, and snippets.

{"_id":"65356e574e8c51dbfbe80638","titre":"Annonce 1","type":"Location","statusPublication":"publie","statusBien":"disponible","description":"","prix":10000,"dateAnnonce":"2023-10-22T00:00:00.000Z","photo":[{"url":"/images/1698000471941-3594623.png","nomFichier":"1698000471941-3594623.png","_id":"65356e574e8c51dbfbe80639"}],"__v":0}
# fullfill_orders_job.rb
...
class FulfillOrdersJob < ApplicationJob
queue_as :default
def perform(*args)
Order.pending.each do |order|
Order.transaction do
# fullfill_orders_job.rb
...
class FulfillOrdersJob < ApplicationJob
queue_as :default
def perform(*args)
Order.pending.each do |order|
Order.transaction do
axios({
"method": "POST",
"url": "https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/pricing/v1.0",
"headers": {
"content-type": "application/x-www-form-urlencoded",
"x-rapidapi-host": "skyscanner-skyscanner-flight-search-v1.p.rapidapi.com",
"x-rapidapi-key": "21bf4db0efmsh13832ff18554d96p141b46jsndbeff7a3cdca"
},
"data": "inboundDate=2020-03-02&cabinClass=business&children=0&infants=0&country=US&currency=USD&locale=en-US&originPlace=SFO-sky&destinationPlace=LHR-sky&outboundDate=2020-02-02&adults=1"
}).then((response) => {
[{
"name": "Club Montmartre",
"address": "84 Rue de Clichy, 75009 Paris, France",
"location": {
"lat": 48.8830876,
"lng": 2.3277620999999726
},
"image": {
"url": "https://s3.eu-west-3.amazonaws.com/actionpoker-app/logo_ccm.jpg"
},
{
"Cocktail": 1,
"Vin": 2,
"Bière": 3,
"Café": 4,
"Thé": 5,
"Spiritueux": 6,
"Champagne": 7,
"Jus": 8,
"Chocolat": 9,
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
# Activate the gem you are reporting the issue against.
@karimmorta
karimmorta / app.js
Created April 15, 2015 15:59 — forked from AlSquire/app.js
/**
* Welcome to Pebble.js!
*
* This is where you write your app.
*/
var UI = require('ui');
var ajax = require('ajax');
function fetchJSON(url) {