You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw"set GOOGLE_APPLICATION_CREDENTIALS variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)";
11
+
throw'set GOOGLE_APPLICATION_CREDENTIALS variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
12
12
}
13
13
14
14
if(!process.env.GCLOUD_PROJECT){
15
-
throw"set GCLOUD_PROJECT variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)";
15
+
throw'set GCLOUD_PROJECT variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
16
16
}
17
17
18
18
/**
@@ -26,15 +26,6 @@ class Publisher {
26
26
27
27
constructor(emitter){
28
28
this.emitter=emitter;
29
-
30
-
// process.on('SIGNINT',function(){
31
-
// process.exit();
32
-
// });
33
-
34
-
// process.on('SIGTERM',function(){
35
-
// process.exit();
36
-
// });
37
-
38
29
}
39
30
40
31
publish(channel,message){
@@ -53,10 +44,7 @@ class Publisher {
53
44
classSubscriberextendsevents.EventEmitter{
54
45
55
46
constructor(){
56
-
super();
57
-
process.on('SIGNINT',function(){
58
-
process.exit();
59
-
});
47
+
super();
60
48
}
61
49
62
50
subscribe(channel){
@@ -87,31 +75,67 @@ class Subscriber extends events.EventEmitter {
87
75
// Here we should get all the subscriptions under the channel topic and unsubscribe them
0 commit comments