Skip to content

Instantly share code, notes, and snippets.

@ROFISH
Created March 14, 2012 07:49
Show Gist options
  • Save ROFISH/2034928 to your computer and use it in GitHub Desktop.
Save ROFISH/2034928 to your computer and use it in GitHub Desktop.
Shopify API has 499 api calls/5 minutes
require 'rubygems'
require 'rest-client'
require 'multi_json'
api_key = "x"
json = RestClient::Request.new(
:method=>:get,
:url=>"https://fangamer.myshopify.com/admin/orders.json?financial_status=paid&fulfillment_status=shipped&created_at_max=2011-01-01&fields=id&limit=249",
:user=>api_key,
:password=>"x").execute
data = (MultiJson.decode(json))
p json.headers[:http_x_shopify_shop_api_call_limit]
for h in data["orders"]
id = h["id"]
#p h["id"]
print "Closing #{id}..."
response = RestClient::Request.new(
:method=>:post,
:url=>"https://fangamer.myshopify.com/admin/orders/#{id}/close.json",
:user=>api_key,
:password=>"x").execute
print " done. #{response.headers[:http_x_shopify_shop_api_call_limit]}\n"
end
ROFISH-Mac-Pro:Desktop fangamer$ ruby order_closer.rb
"1/500"
Closing 28269192... done. 2/500
Closing 28268732... done. 3/500
Closing 28268442... done. 4/500
Closing 28267522... done. 5/500
Closing 28267422... done. 6/500
Closing 28267382... done. 7/500
Closing 28266882... done. 8/500
Closing 28266382... done. 9/500
Closing 28266092... done. 10/500
Closing 28265732... done. 11/500
Closing 28265342... done. 12/500
Closing 28265312... done. 13/500
Closing 28264752... done. 14/500
Closing 28264702... done. 15/500
Closing 28264242... done. 16/500
Closing 28263852... done. 17/500
Closing 28262932... done. 18/500
Closing 28262542... done. 19/500
Closing 28261652... done. 20/500
Closing 28261632... done. 21/500
Closing 28261592... done. 22/500
Closing 28260972... done. 23/500
Closing 28260102... done. 24/500
Closing 28259912... done. 25/500
Closing 28259832... done. 26/500
Closing 28259682... done. 27/500
Closing 28258692... done. 28/500
Closing 28258512... done. 29/500
Closing 28257742... done. 30/500
Closing 28256322... done. 31/500
Closing 28256212... done. 32/500
Closing 28255472... done. 33/500
Closing 28255152... done. 34/500
Closing 28255072... done. 35/500
Closing 28255052... done. 36/500
Closing 28254392... done. 37/500
Closing 28254262... done. 38/500
Closing 28253892... done. 39/500
Closing 28252582... done. 40/500
Closing 28252562... done. 41/500
Closing 28252162... done. 42/500
Closing 28251922... done. 43/500
Closing 28251682... done. 44/500
Closing 28251662... done. 45/500
Closing 28251152... done. 46/500
Closing 28250932... done. 47/500
Closing 28250652... done. 48/500
Closing 28250212... done. 49/500
Closing 28249942... done. 50/500
Closing 28248042... done. 51/500
Closing 28243732... done. 52/500
Closing 28242992... done. 53/500
Closing 28240992... done. 54/500
Closing 28239572... done. 55/500
Closing 28239272... done. 56/500
Closing 28235292... done. 57/500
Closing 28235192... done. 58/500
Closing 28234172... done. 59/500
Closing 28232872... done. 60/500
Closing 28231572... done. 61/500
Closing 28229302... done. 62/500
Closing 28226682... done. 63/500
Closing 28223672... done. 64/500
Closing 28223052... done. 65/500
Closing 28221792... done. 66/500
Closing 28219102... done. 67/500
Closing 28215692... done. 68/500
Closing 28213092... done. 69/500
Closing 28209412... done. 70/500
Closing 28209142... done. 71/500
Closing 28207112... done. 72/500
Closing 28205562... done. 73/500
Closing 28204832... done. 74/500
Closing 28204602... done. 75/500
Closing 28204162... done. 76/500
Closing 28203912... done. 77/500
Closing 28201402... done. 78/500
Closing 28201372... done. 79/500
Closing 28201072... done. 80/500
Closing 28200862... done. 81/500
Closing 28200632... done. 82/500
Closing 28200612... done. 83/500
Closing 28200452... done. 84/500
Closing 28199952... done. 85/500
Closing 28198902... done. 86/500
Closing 28198252... done. 87/500
Closing 28198232... done. 88/500
Closing 28198192... done. 89/500
Closing 28197952... done. 90/500
Closing 28197882... done. 91/500
Closing 28197792... done. 92/500
Closing 28197772... done. 93/500
Closing 28197222... done. 94/500
Closing 28197082... done. 95/500
Closing 28196952... done. 96/500
Closing 28195562... done. 97/500
Closing 28194532... done. 98/500
Closing 28193482... done. 99/500
Closing 28191922... done. 100/500
Closing 28191762... done. 101/500
Closing 28187962... done. 102/500
Closing 28187202... done. 103/500
Closing 28186802... done. 104/500
Closing 28185162... done. 105/500
Closing 28184472... done. 106/500
Closing 28181642... done. 107/500
Closing 28180102... done. 108/500
Closing 28178462... done. 109/500
Closing 28176842... done. 110/500
Closing 28174612... done. 111/500
Closing 28171972... done. 112/500
Closing 28171952... done. 113/500
Closing 28170962... done. 114/500
Closing 28170782... done. 115/500
Closing 28169912... done. 116/500
Closing 28165962... done. 117/500
Closing 28164972... done. 118/500
Closing 28161632... done. 119/500
Closing 28159582... done. 120/500
Closing 28158492... done. 121/500
Closing 28157612... done. 122/500
Closing 28157352... done. 123/500
Closing 28150742... done. 124/500
Closing 28148252... done. 125/500
Closing 28145922... done. 126/500
Closing 28145372... done. 127/500
Closing 28145332... done. 128/500
Closing 28144702... done. 129/500
Closing 28144352... done. 130/500
Closing 28143232... done. 131/500
Closing 28140452... done. 132/500
Closing 28140272... done. 133/500
Closing 28139632... done. 134/500
Closing 28139572... done. 135/500
Closing 28139102... done. 136/500
Closing 28137712... done. 137/500
Closing 28136952... done. 138/500
Closing 28134922... done. 139/500
Closing 28134312... done. 140/500
Closing 28133012... done. 141/500
Closing 28131392... done. 142/500
Closing 28130832... done. 143/500
Closing 28130482... done. 144/500
Closing 28129872... done. 145/500
Closing 28127902... done. 146/500
Closing 28127592... done. 147/500
Closing 28127472... done. 148/500
Closing 28125952... done. 149/500
Closing 28120522... done. 150/500
Closing 28119462... done. 151/500
Closing 28119452... done. 152/500
Closing 28119272... done. 153/500
Closing 28118812... done. 154/500
Closing 28113032... done. 155/500
Closing 28112852... done. 156/500
Closing 28112222... done. 157/500
Closing 28111902... done. 158/500
Closing 28110682... done. 159/500
Closing 28106862... done. 160/500
Closing 28105602... done. 161/500
Closing 28104282... done. 162/500
Closing 28104192... done. 163/500
Closing 28103032... done. 164/500
Closing 28102552... done. 165/500
Closing 28102022... done. 166/500
Closing 28098822... done. 167/500
Closing 28098282... done. 168/500
Closing 28092162... done. 169/500
Closing 28090742... done. 170/500
Closing 28089422... done. 171/500
Closing 28089342... done. 172/500
Closing 28087532... done. 173/500
Closing 28087052... done. 174/500
Closing 28086912... done. 175/500
Closing 28085712... done. 176/500
Closing 28079712... done. 177/500
Closing 28076602... done. 178/500
Closing 28073582... done. 179/500
Closing 28072602... done. 180/500
Closing 28072272... done. 181/500
Closing 28070232... done. 182/500
Closing 28068982... done. 183/500
Closing 28068142... done. 184/500
Closing 28067742... done. 185/500
Closing 28067372... done. 186/500
Closing 28066222... done. 187/500
Closing 28066002... done. 188/500
Closing 28064922... done. 189/500
Closing 28064582... done. 190/500
Closing 28064542... done. 191/500
Closing 28063712... done. 192/500
Closing 28063652... done. 193/500
Closing 28061772... done. 194/500
Closing 28061462... done. 195/500
Closing 28061432... done. 196/500
Closing 28061352... done. 197/500
Closing 28061002... done. 198/500
Closing 28060992... done. 199/500
Closing 28060632... done. 200/500
Closing 28060262... done. 201/500
Closing 28060102... done. 202/500
Closing 28059792... done. 203/500
Closing 28059362... done. 204/500
Closing 28059172... done. 205/500
Closing 28058882... done. 206/500
Closing 28058342... done. 207/500
Closing 28058002... done. 208/500
Closing 28057602... done. 209/500
Closing 28057222... done. 210/500
Closing 28057092... done. 211/500
Closing 28055722... done. 212/500
Closing 28053312... done. 213/500
Closing 28052082... done. 214/500
Closing 28051732... done. 215/500
Closing 28051152... done. 216/500
Closing 28050412... done. 217/500
Closing 28049792... done. 218/500
Closing 28049262... done. 219/500
Closing 28048562... done. 220/500
Closing 28048052... done. 221/500
Closing 28047252... done. 222/500
Closing 28047202... done. 223/500
Closing 28047102... done. 224/500
Closing 28046562... done. 225/500
Closing 28045542... done. 226/500
Closing 28045482... done. 227/500
Closing 28044832... done. 228/500
Closing 28044582... done. 229/500
Closing 28044392... done. 230/500
Closing 28043932... done. 231/500
Closing 28043742... done. 232/500
Closing 28043632... done. 233/500
Closing 28042352... done. 234/500
Closing 28041722... done. 235/500
Closing 28041462... done. 236/500
Closing 28040722... done. 237/500
Closing 28040552... done. 238/500
Closing 28039902... done. 239/500
Closing 28039252... done. 240/500
Closing 28039172... done. 241/500
Closing 28038822... done. 242/500
Closing 28038592... done. 243/500
Closing 28037842... done. 244/500
Closing 28037822... done. 245/500
Closing 28037512... done. 246/500
Closing 28037382... done. 247/500
Closing 28037272... done. 248/500
Closing 28037152... done. 249/500
Closing 28036522... done. 250/500
ROFISH-Mac-Pro:Desktop fangamer$ ruby order_closer.rb
"1/500"
Closing 28036102... done. 2/500
Closing 28035412... done. 3/500
Closing 28035142... done. 4/500
Closing 28035132... done. 5/500
Closing 28034872... done. 6/500
Closing 28033952... done. 7/500
Closing 28033772... done. 8/500
Closing 28033032... done. 9/500
Closing 28030032... done. 10/500
Closing 28029572... done. 11/500
Closing 28027812... done. 12/500
Closing 28027262... done. 13/500
Closing 28025032... done. 14/500
Closing 28024112... done. 15/500
Closing 28024042... done. 16/500
Closing 28022902... done. 17/500
Closing 28022082... done. 18/500
Closing 28021422... done. 19/500
Closing 28020982... done. 20/500
Closing 28019362... done. 21/500
Closing 28018792... done. 22/500
Closing 28007532... done. 23/500
Closing 28007292... done. 24/500
Closing 28006852... done. 25/500
Closing 28006802... done. 26/500
Closing 28006682... done. 27/500
Closing 28006022... done. 28/500
Closing 28005882... done. 29/500
Closing 28005812... done. 30/500
Closing 28005762... done. 31/500
Closing 28005622... done. 32/500
Closing 28005582... done. 33/500
Closing 28005532... done. 34/500
Closing 28005502... done. 35/500
Closing 28005482... done. 36/500
Closing 28005452... done. 37/500
Closing 28005412... done. 38/500
Closing 28004582... done. 39/500
Closing 28004472... done. 40/500
Closing 28004252... done. 41/500
Closing 28003722... done. 42/500
Closing 28003382... done. 43/500
Closing 28003252... done. 44/500
Closing 28002832... done. 45/500
Closing 28002682... done. 46/500
Closing 28002422... done. 47/500
Closing 28002382... done. 48/500
Closing 28001762... done. 49/500
Closing 28001702... done. 50/500
Closing 28001562... done. 51/500
Closing 28001252... done. 52/500
Closing 28001212... done. 53/500
Closing 28000992... done. 54/500
Closing 28000982... done. 55/500
Closing 28000792... done. 56/500
Closing 28000742... done. 57/500
Closing 28000712... done. 58/500
Closing 28000692... done. 59/500
Closing 28000302... done. 60/500
Closing 28000242... done. 61/500
Closing 28000172... done. 62/500
Closing 27997352... done. 63/500
Closing 27997102... done. 64/500
Closing 27996982... done. 65/500
Closing 27996642... done. 66/500
Closing 27996542... done. 67/500
Closing 27996412... done. 68/500
Closing 27996342... done. 69/500
Closing 27996142... done. 70/500
Closing 27995732... done. 71/500
Closing 27995502... done. 72/500
Closing 27994052... done. 73/500
Closing 27993032... done. 74/500
Closing 27992862... done. 75/500
Closing 27991782... done. 76/500
Closing 27991702... done. 77/500
Closing 27991692... done. 78/500
Closing 27991042... done. 79/500
Closing 27990532... done. 80/500
Closing 27990342... done. 81/500
Closing 27990112... done. 82/500
Closing 27989832... done. 83/500
Closing 27988672... done. 84/500
Closing 27988462... done. 85/500
Closing 27988152... done. 86/500
Closing 27987592... done. 87/500
Closing 27987512... done. 88/500
Closing 27986472... done. 89/500
Closing 27986312... done. 90/500
Closing 27986132... done. 91/500
Closing 27985912... done. 92/500
Closing 27985412... done. 93/500
Closing 27985152... done. 94/500
Closing 27984622... done. 95/500
Closing 27984002... done. 96/500
Closing 27983562... done. 97/500
Closing 27983482... done. 98/500
Closing 27983022... done. 99/500
Closing 27982742... done. 100/500
Closing 27982462... done. 101/500
Closing 27981912... done. 102/500
Closing 27981772... done. 103/500
Closing 27981182... done. 104/500
Closing 27981072... done. 105/500
Closing 27980752... done. 106/500
Closing 27980362... done. 107/500
Closing 27980022... done. 108/500
Closing 27979672... done. 109/500
Closing 27979582... done. 110/500
Closing 27978652... done. 111/500
Closing 27978632... done. 112/500
Closing 27978602... done. 113/500
Closing 27978562... done. 114/500
Closing 27978522... done. 115/500
Closing 27978502... done. 116/500
Closing 27978152... done. 117/500
Closing 27977972... done. 118/500
Closing 27976832... done. 119/500
Closing 27976602... done. 120/500
Closing 27976562... done. 121/500
Closing 27975992... done. 122/500
Closing 27975722... done. 123/500
Closing 27975612... done. 124/500
Closing 27975542... done. 125/500
Closing 27975172... done. 126/500
Closing 27974842... done. 127/500
Closing 27974752... done. 128/500
Closing 27974662... done. 129/500
Closing 27974592... done. 130/500
Closing 27974022... done. 131/500
Closing 27973912... done. 132/500
Closing 27973732... done. 133/500
Closing 27973712... done. 134/500
Closing 27973552... done. 135/500
Closing 27973422... done. 136/500
Closing 27973342... done. 137/500
Closing 27973322... done. 138/500
Closing 27972922... done. 139/500
Closing 27972732... done. 140/500
Closing 27972672... done. 141/500
Closing 27972542... done. 142/500
Closing 27972472... done. 143/500
Closing 27972442... done. 144/500
Closing 27972432... done. 145/500
Closing 27972292... done. 146/500
Closing 27971682... done. 147/500
Closing 27971672... done. 148/500
Closing 27970852... done. 149/500
Closing 27970812... done. 150/500
Closing 27970712... done. 151/500
Closing 27970362... done. 152/500
Closing 27970042... done. 153/500
Closing 27969792... done. 154/500
Closing 27969722... done. 155/500
Closing 27969712... done. 156/500
Closing 27969422... done. 157/500
Closing 27969202... done. 158/500
Closing 27969002... done. 159/500
Closing 27968112... done. 160/500
Closing 27967822... done. 161/500
Closing 27965922... done. 162/500
Closing 27965302... done. 163/500
Closing 27965222... done. 164/500
Closing 27964912... done. 165/500
Closing 27964872... done. 166/500
Closing 27964672... done. 167/500
Closing 27964232... done. 168/500
Closing 27964182... done. 169/500
Closing 27963942... done. 170/500
Closing 27962622... done. 171/500
Closing 27962202... done. 172/500
Closing 27961612... done. 173/500
Closing 27961482... done. 174/500
Closing 27961352... done. 175/500
Closing 27961192... done. 176/500
Closing 27960682... done. 177/500
Closing 27960292... done. 178/500
Closing 27960202... done. 179/500
Closing 27959642... done. 180/500
Closing 27959412... done. 181/500
Closing 27959362... done. 182/500
Closing 27959342... done. 183/500
Closing 27959332... done. 184/500
Closing 27959302... done. 185/500
Closing 27959262... done. 186/500
Closing 27959222... done. 187/500
Closing 27959212... done. 188/500
Closing 27959182... done. 189/500
Closing 27959112... done. 190/500
Closing 27959102... done. 191/500
Closing 27959082... done. 192/500
Closing 27958792... done. 193/500
Closing 27958622... done. 194/500
Closing 27958382... done. 195/500
Closing 27958352... done. 196/500
Closing 27958122... done. 197/500
Closing 27957832... done. 198/500
Closing 27957672... done. 199/500
Closing 27957482... done. 200/500
Closing 27957342... done. 201/500
Closing 27957332... done. 202/500
Closing 27957312... done. 203/500
Closing 27957302... done. 204/500
Closing 27957062... done. 205/500
Closing 27957012... done. 206/500
Closing 27956922... done. 207/500
Closing 27956802... done. 208/500
Closing 27956762... done. 209/500
Closing 27956622... done. 210/500
Closing 27956552... done. 211/500
Closing 27956542... done. 212/500
Closing 27956492... done. 213/500
Closing 27956352... done. 214/500
Closing 27956172... done. 215/500
Closing 27956092... done. 216/500
Closing 27956002... done. 217/500
Closing 27955792... done. 218/500
Closing 27955712... done. 219/500
Closing 27955652... done. 220/500
Closing 27955612... done. 221/500
Closing 27955532... done. 222/500
Closing 27955332... done. 223/500
Closing 27955152... done. 224/500
Closing 27955082... done. 225/500
Closing 27954952... done. 226/500
Closing 27954812... done. 227/500
Closing 27954662... done. 228/500
Closing 27954582... done. 229/500
Closing 27954282... done. 230/500
Closing 27954162... done. 231/500
Closing 27953972... done. 232/500
Closing 27953912... done. 233/500
Closing 27953902... done. 234/500
Closing 27953862... done. 235/500
Closing 27953832... done. 236/500
Closing 27953802... done. 237/500
Closing 27953792... done. 238/500
Closing 27953762... done. 239/500
Closing 27953712... done. 240/500
Closing 27953592... done. 241/500
Closing 27953582... done. 242/500
Closing 27953542... done. 243/500
Closing 27953452... done. 244/500
Closing 27953422... done. 245/500
Closing 27953412... done. 246/500
Closing 27953372... done. 247/500
Closing 27953332... done. 248/500
Closing 27953322... done. 249/500
Closing 27953312... done. 250/500
ROFISH-Mac-Pro:Desktop fangamer$ ruby order_closer.rb
"251/500"
Closing 27953292... done. 252/500
Closing 27953102... done. 253/500
Closing 27952782... done. 254/500
Closing 27952742... done. 255/500
Closing 27952612... done. 256/500
Closing 27951892... done. 257/500
Closing 27951852... done. 258/500
Closing 27951842... done. 259/500
Closing 27951772... done. 260/500
Closing 27951712... done. 261/500
Closing 27951462... done. 262/500
Closing 27951332... done. 263/500
Closing 27951122... done. 264/500
Closing 27950012... done. 265/500
Closing 27950002... done. 266/500
Closing 27949772... done. 267/500
Closing 27949112... done. 268/500
Closing 27949092... done. 269/500
Closing 27949052... done. 270/500
Closing 27948832... done. 271/500
Closing 27948672... done. 272/500
Closing 27948372... done. 273/500
Closing 27948192... done. 274/500
Closing 27948072... done. 275/500
Closing 27947892... done. 276/500
Closing 27947722... done. 277/500
Closing 27947672... done. 278/500
Closing 27947652... done. 279/500
Closing 27947602... done. 280/500
Closing 27947542... done. 281/500
Closing 27947472... done. 282/500
Closing 27947332... done. 283/500
Closing 27947292... done. 284/500
Closing 27947232... done. 285/500
Closing 27947202... done. 286/500
Closing 27946792... done. 287/500
Closing 27946772... done. 288/500
Closing 27946572... done. 289/500
Closing 27946542... done. 290/500
Closing 27946532... done. 291/500
Closing 27946492... done. 292/500
Closing 27946442... done. 293/500
Closing 27946432... done. 294/500
Closing 27946312... done. 295/500
Closing 27946272... done. 296/500
Closing 27946212... done. 297/500
Closing 27946192... done. 298/500
Closing 27946172... done. 299/500
Closing 27946142... done. 300/500
Closing 27946072... done. 301/500
Closing 27946042... done. 302/500
Closing 27945912... done. 303/500
Closing 27945902... done. 304/500
Closing 27945892... done. 305/500
Closing 27945862... done. 306/500
Closing 27945842... done. 307/500
Closing 27945802... done. 308/500
Closing 27945702... done. 309/500
Closing 27945642... done. 310/500
Closing 27945602... done. 311/500
Closing 27945562... done. 312/500
Closing 27945492... done. 313/500
Closing 27945472... done. 314/500
Closing 27945362... done. 315/500
Closing 27945262... done. 316/500
Closing 27945252... done. 317/500
Closing 27945212... done. 318/500
Closing 27945162... done. 319/500
Closing 27944942... done. 320/500
Closing 27944862... done. 321/500
Closing 27944852... done. 322/500
Closing 27944682... done. 323/500
Closing 27944662... done. 324/500
Closing 27944452... done. 325/500
Closing 27944382... done. 326/500
Closing 27944112... done. 327/500
Closing 27927392... done. 328/500
Closing 27921002... done. 329/500
Closing 27895932... done. 330/500
Closing 27879292... done. 331/500
Closing 27877372... done. 332/500
Closing 27863412... done. 333/500
Closing 27861682... done. 334/500
Closing 27858612... done. 335/500
Closing 27855982... done. 336/500
Closing 27841342... done. 337/500
Closing 27839752... done. 338/500
Closing 27836732... done. 339/500
Closing 27832952... done. 340/500
Closing 27817062... done. 341/500
Closing 27809172... done. 342/500
Closing 27808192... done. 343/500
Closing 27803712... done. 344/500
Closing 27798302... done. 345/500
Closing 27766702... done. 346/500
Closing 27762382... done. 347/500
Closing 27756432... done. 348/500
Closing 27756372... done. 349/500
Closing 27752212... done. 350/500
Closing 27742842... done. 351/500
Closing 27738232... done. 352/500
Closing 27732312... done. 353/500
Closing 27728202... done. 354/500
Closing 27724242... done. 355/500
Closing 27715732... done. 356/500
Closing 27712132... done. 357/500
Closing 27696232... done. 358/500
Closing 27694932... done. 359/500
Closing 27692052... done. 360/500
Closing 27691832... done. 361/500
Closing 27691432... done. 362/500
Closing 27689092... done. 363/500
Closing 27685622... done. 364/500
Closing 27668342... done. 365/500
Closing 27666102... done. 366/500
Closing 27664462... done. 367/500
Closing 27662032... done. 368/500
Closing 27660972... done. 369/500
Closing 27656602... done. 370/500
Closing 27627122... done. 371/500
Closing 27620092... done. 372/500
Closing 27618132... done. 373/500
Closing 27611652... done. 374/500
Closing 27609602... done. 375/500
Closing 27598142... done. 376/500
Closing 27591612... done. 377/500
Closing 27562532... done. 378/500
Closing 27555262... done. 379/500
Closing 27551022... done. 380/500
Closing 27550542... done. 381/500
Closing 27547992... done. 382/500
Closing 27545592... done. 383/500
Closing 27531452... done. 384/500
Closing 27521372... done. 385/500
Closing 27515992... done. 386/500
Closing 27513062... done. 387/500
Closing 27509902... done. 388/500
Closing 27505862... done. 389/500
Closing 27499462... done. 390/500
Closing 27497132... done. 391/500
Closing 27485332... done. 392/500
Closing 27481172... done. 393/500
Closing 27479952... done. 394/500
Closing 27462982... done. 395/500
Closing 27462022... done. 396/500
Closing 27460002... done. 397/500
Closing 27459782... done. 398/500
Closing 27457982... done. 399/500
Closing 27453412... done. 400/500
Closing 27439222... done. 401/500
Closing 27436822... done. 402/500
Closing 27432782... done. 403/500
Closing 27416672... done. 404/500
Closing 27410562... done. 405/500
Closing 27397962... done. 406/500
Closing 27389672... done. 407/500
Closing 27389562... done. 408/500
Closing 27380452... done. 409/500
Closing 27370472... done. 410/500
Closing 27363562... done. 411/500
Closing 27351682... done. 412/500
Closing 27348612... done. 413/500
Closing 27326712... done. 414/500
Closing 27321402... done. 415/500
Closing 27316982... done. 416/500
Closing 27310142... done. 417/500
Closing 27309282... done. 418/500
Closing 27308272... done. 419/500
Closing 27307772... done. 420/500
Closing 27307442... done. 421/500
Closing 27303082... done. 422/500
Closing 27298752... done. 423/500
Closing 27286132... done. 424/500
Closing 27273972... done. 425/500
Closing 27255392... done. 426/500
Closing 27251232... done. 427/500
Closing 27251122... done. 428/500
Closing 27249732... done. 429/500
Closing 27249132... done. 430/500
Closing 27249042... done. 431/500
Closing 27247122... done. 432/500
Closing 27230992... done. 433/500
Closing 27225912... done. 434/500
Closing 27213432... done. 435/500
Closing 27205762... done. 436/500
Closing 27198942... done. 437/500
Closing 27185532... done. 438/500
Closing 27182682... done. 439/500
Closing 27182112... done. 440/500
Closing 27181542... done. 441/500
Closing 27180112... done. 442/500
Closing 27177752... done. 443/500
Closing 27161292... done. 444/500
Closing 27151062... done. 445/500
Closing 27145942... done. 446/500
Closing 27142452... done. 447/500
Closing 27137332... done. 448/500
Closing 27131792... done. 449/500
Closing 27130342... done. 450/500
Closing 27129812... done. 451/500
Closing 27127642... done. 452/500
Closing 27124642... done. 453/500
Closing 27112972... done. 454/500
Closing 27112522... done. 455/500
Closing 27109712... done. 456/500
Closing 27105452... done. 457/500
Closing 27103522... done. 458/500
Closing 27102602... done. 459/500
Closing 27102352... done. 460/500
Closing 27102122... done. 461/500
Closing 27101582... done. 462/500
Closing 27101532... done. 463/500
Closing 27100542... done. 464/500
Closing 27100522... done. 465/500
Closing 27099862... done. 466/500
Closing 27099092... done. 467/500
Closing 27098992... done. 468/500
Closing 27098392... done. 469/500
Closing 27097782... done. 470/500
Closing 27096612... done. 471/500
Closing 27096442... done. 472/500
Closing 27096392... done. 473/500
Closing 27096242... done. 474/500
Closing 27096092... done. 475/500
Closing 27096032... done. 476/500
Closing 27095802... done. 477/500
Closing 27095782... done. 478/500
Closing 27095322... done. 479/500
Closing 27095012... done. 480/500
Closing 27094992... done. 481/500
Closing 27094982... done. 482/500
Closing 27094892... done. 483/500
Closing 27094872... done. 484/500
Closing 27094822... done. 485/500
Closing 27094832... done. 486/500
Closing 27094812... done. 487/500
Closing 27094802... done. 488/500
Closing 27094782... done. 489/500
Closing 27094762... done. 490/500
Closing 27084112... done. 491/500
Closing 27077442... done. 492/500
Closing 27065922... done. 493/500
Closing 27060392... done. 494/500
Closing 27046572... done. 495/500
Closing 27042612... done. 496/500
Closing 27040822... done. 497/500
Closing 27028492... done. 498/500
Closing 27025642... done. 499/500
Closing 26985292.../Users/fangamer/.rvm/gems/ruby-1.9.3-p0/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 503 Service Unavailable (RestClient::ServiceUnavailable)
from /Users/fangamer/.rvm/gems/ruby-1.9.3-p0/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
from /Users/fangamer/.rvm/gems/ruby-1.9.3-p0/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /Users/fangamer/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /Users/fangamer/.rvm/gems/ruby-1.9.3-p0/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /Users/fangamer/.rvm/gems/ruby-1.9.3-p0/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from order_closer.rb:24:in `block in <main>'
from order_closer.rb:20:in `each'
from order_closer.rb:20:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment