-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
19 lines (14 loc) · 4.11 KB
/
Makefile
File metadata and controls
19 lines (14 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FUNCTIONS_PROJECT_ID := paagal-starlord
create-pubsub-topic:
gcloud --project=$(FUNCTIONS_PROJECT_ID) pubsub topics create copycat-requests
deploy-pubsub-listner:
gcloud --project $(FUNCTIONS_PROJECT_ID) beta functions deploy CopycatStreamingPubSubHandler \
--set-env-vars BUCKET_NAME="$(BUCKET_NAME)",DEST_BASE_URL="$(DEST_BASE_URL)" \
--runtime nodejs8 \
--trigger-event google.pubsub.topic.publish \
--trigger-resource copycat-requests \
--timeout 1m
deploy-all: deploy-pubsub-listner
test-pubsub-topic:
gcloud --project=$(FUNCTIONS_PROJECT_ID) pubsub topics publish copycat-requests \
--message '{"request":{"path":"/api/messages","headers":{"accept":"*/*","accept-language":"en-IN,en;q=0.9,en-GB;q=0.8,en-US;q=0.7,hi;q=0.6","cache-control":"no-cache","content-type":"application/json","pragma":"no-cache","accept-encoding":"gzip, deflate, br","content-length":"245","cookie":"PHPSESSID=6jqt0c3ddq36oba491fv6842r1; _ga=GA1.2.758701936.1549267112; pagalguy_uid_v9=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDYxMzIzZjNmZWM0OGFmYTY2OGVlY2I2MmI0OGU3NCIsImlzcyI6IlBhR2FMR3VZIiwiaWF0IjoxNTQ5MjY3MTIzODkxLCJleHAiOjE1NTE4NTkxMjM4OTF9.5jFAets6AkbWaj83eLUrGPaJKhV13XCGGh7gipOosJI; __gads=ID=2e1c7b2fb08180d5:T=1549267149:S=ALNI_MbJKyrzb0YL0JfyR97XlEzNrEtWeA; racoon=6c2df719640c4fdbbe19ce664a75e101; pg_ga_uid=25846117; pagalguy_uid=nFYO5UccKPPCzqjNBIP72YLLqQCji1KtuZiS7WrCdR8=; _gid=GA1.2.2053508726.1549877554; groot=b8b1dae5770242be9d672fe5b38f7782; _gat=1","dnt":"1","origin":"https://www.pagalguy.com","referer":"https://www.pagalguy.com/@pgengineering","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"},"method":"POST","payload":{"action":"create","post":{"created":1549954520698,"updated":1549954520698,"content":"<p>another another message from profile</p>","participant_id":26103103,"author":25846117,"client_id":"-LYVUGOumlLIW2qGzyw5","content_type":"text"}}},"response":{"headers":{"access-control-allow-credentials":"true","access-control-allow-headers":"Content-Type, *","access-control-allow-methods":"POST, GET, PUT, DELETE","access-control-allow-origin":"https://www.pagalguy.com","access-control-max-age":"86400","cache-control":"no-cache, no-store, must-revalidate, max-age=30","content-encoding":"gzip","content-length":"836","content-type":"application/json; charset=utf-8","date":"Tue, 12 Feb 2019 06:55:22 GMT","expires":"Fri, 30 Oct 1980 14:19:41 GMT","server":"Google Frontend","status":"200","vary":"Accept-Encoding","x-cloud-trace-context":"9108cc0b2fa7c86c97141874d330ef23","x-frame-options":"sameorigin"},"payload":{"post":{"group":5753464160256000,"client_id":"-LYVUGOumlLIW2qGzyw5","author":25846117,"embeds":[],"last_synced":1549954522000,"created":1549954522000,"content":"<p>another another message from profile</p>","source":"web","state":1,"content_type":"text","url":"/messages/4548733468934144/another-another-message-from-profile","key":"ahFzfnBhYWdhbC1zdGFybG9yZHIUCxIHTWVzc2FnZRiAgODUyKGKCAyiAQhwYWdhbGd1eQ","conversation_id":5753464160256000,"author_id":25846117,"metadata":{"ipaddress":"58.146.111.21"},"id":4548733468934144,"pinned_at":1549954522000},"group":{"updated":1549954502000,"hash":"34c5d3c15ee823d2026c3b200e5467d0","content_type":"private-group","author":25846117,"url":"/conversations/5753464160256000/sonnes-pgengineering","cache":{"last_posted_users":[25846117,26103103],"last_post_ids":[4758085579571200,5540929067286528,4559100852043776,6385704646475776,4733259935645696,6562418861277184,6168774765445120,4712943356215296,4868458954620928,4505234375704576],"last_post_tss":[1529906068000,1530076522000,1530076534000,1548229300000,1548232743000,1548232937000,1549953812000,1549953860000,1549954151000,1549954502000]},"state":1,"created":1475231168000,"participants":[25846117,26103103],"score":1549954502004,"key":"ahFzfnBhYWdhbC1zdGFybG9yZHIZCxIMQ29udmVyc2F0aW9uGICAgJzsl5wKDKIBCHBhZ2FsZ3V5","activity":{"score":"1581490502.000000","last_messaged_by":25846117,"last_read":{"25846117":1549954502004,"26103103":1548232937195}},"title":"@sonnes & @pgengineering","counts":{"participants":2,"messages":43},"id":5753464160256000},"success":true}}}'