Skip to content

Instantly share code, notes, and snippets.

@ijunaid8989
Created October 25, 2016 12:12
Show Gist options
  • Save ijunaid8989/e4f8398f899e3ef77f728d97fee21be0 to your computer and use it in GitHub Desktop.
Save ijunaid8989/e4f8398f899e3ef77f728d97fee21be0 to your computer and use it in GitHub Desktop.
SneakPeak
As you requested..
from = "2016-10-24 00:00:00+00" to "2016-10-24 00:00:00+00".. and the time was "Monday":["9:0-18:0"]..
You set the interval to 1800(30 minutes.)
It should be getting pictures for 9 hours with 30 minutes range which were going to be 18..
Results it got 13 Images..
and logs are like that
2016-10-25T12:00:05.652480+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:05.652497+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:05.652499+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:05.653305+00:00 app[web.1]: "writing"
2016-10-25T12:00:07.152042+00:00 app[web.1]: "written"
2016-10-25T12:00:07.291407+00:00 app[web.1]: "Not an Image! {\"message\":\"Snapshot not found.\"}"
2016-10-25T12:00:07.629403+00:00 app[web.1]: "Not an Image! {\"message\":\"Snapshot not found.\"}"
2016-10-25T12:00:08.460914+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:08.460924+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:08.460925+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:08.472049+00:00 app[web.1]: "writing"
2016-10-25T12:00:09.206606+00:00 app[web.1]: "written"
2016-10-25T12:00:11.324814+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:11.324823+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:11.324824+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:11.341836+00:00 app[web.1]: "writing"
2016-10-25T12:00:12.014157+00:00 app[web.1]: "written"
2016-10-25T12:00:13.323884+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:13.323874+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:13.328479+00:00 app[web.1]: "writing"
2016-10-25T12:00:13.323885+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:13.996315+00:00 app[web.1]: "written"
2016-10-25T12:00:14.452431+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:14.452441+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:14.452442+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:14.452443+00:00 app[web.1]: "writing"
2016-10-25T12:00:15.265065+00:00 app[web.1]: "written"
2016-10-25T12:00:15.599969+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:15.599979+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:15.599981+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:15.600535+00:00 app[web.1]: "writing"
2016-10-25T12:00:17.123575+00:00 app[web.1]: "written"
2016-10-25T12:00:17.239610+00:00 app[web.1]: "Not an Image! {\"message\":\"Snapshot not found.\"}"
2016-10-25T12:00:17.613048+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:17.613064+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:17.613065+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:17.614067+00:00 app[web.1]: "writing"
2016-10-25T12:00:18.511402+00:00 app[web.1]: "written"
2016-10-25T12:00:18.887978+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:18.887994+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:18.887996+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:18.890899+00:00 app[web.1]: "writing"
2016-10-25T12:00:19.619407+00:00 app[web.1]: "written"
2016-10-25T12:00:19.720744+00:00 app[web.1]: "Not an Image! {\"message\":\"Snapshot not found.\"}"
2016-10-25T12:00:20.147896+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:20.147907+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:20.213850+00:00 app[web.1]: "writing"
2016-10-25T12:00:20.147908+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:22.612467+00:00 app[web.1]: "written"
2016-10-25T12:00:22.708342+00:00 app[web.1]: "Not an Image! {\"message\":\"Snapshot not found.\"}"
2016-10-25T12:00:23.043746+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:23.043747+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:23.043735+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:23.044399+00:00 app[web.1]: "writing"
2016-10-25T12:00:23.885439+00:00 app[web.1]: "written"
2016-10-25T12:00:24.519058+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:24.519068+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:24.519070+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:24.522041+00:00 app[web.1]: "writing"
2016-10-25T12:00:25.267228+00:00 app[web.1]: "written"
2016-10-25T12:00:26.989790+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:26.989799+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:26.989801+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:26.991309+00:00 app[web.1]: "writing"
2016-10-25T12:00:28.589408+00:00 app[web.1]: "written"
2016-10-25T12:00:28.975480+00:00 app[web.1]: <<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
2016-10-25T12:00:28.975484+00:00 app[web.1]: 219, 0, 197, 0, 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30,
2016-10-25T12:00:28.975486+00:00 app[web.1]: 50, 33, 30, 28, 28, 30, 61, 44, 46, 36, ...>>
2016-10-25T12:00:28.978753+00:00 app[web.1]: "writing"
2016-10-25T12:00:30.978128+00:00 app[web.1]: "written"
2016-10-25T12:00:30.979217+00:00 app[web.1]: "We are finished!"
Remarkable thing.. there were 5 times when there were no snapshot on media side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment