Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
511a4487
Commit
511a4487
authored
14 years ago
by
Raphael
Browse files
Options
Downloads
Patches
Plain Diff
Make running the websocket server a little easier
parent
99ad001d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
script/server
+5
-0
5 additions, 0 deletions
script/server
script/websocket_server.rb
+8
-1
8 additions, 1 deletion
script/websocket_server.rb
with
13 additions
and
1 deletion
script/server
0 → 100755
+
5
−
0
View file @
511a4487
#!/bin/bash
mkdir
-p
-v
log/thin/
bundle
exec
ruby ./script/websocket_server.rb&
bundle
exec
thin start
$@
This diff is collapsed.
Click to expand it.
script/websocket_server.rb
+
8
−
1
View file @
511a4487
...
...
@@ -19,6 +19,7 @@ def process_message
end
begin
EM
.
run
{
Diaspora
::
WebSocket
.
initialize_channels
...
...
@@ -35,7 +36,13 @@ end
ws
.
onclose
{
Diaspora
::
WebSocket
.
unsubscribe
(
ws
.
request
[
'Path'
].
gsub
(
'/'
,
''
),
sid
)
}
}
end
puts
"Websocket server started."
process_message
}
rescue
RuntimeError
=>
e
raise
e
unless
e
.
message
.
include?
(
"no acceptor"
)
puts
"Are you sure the websocket server isn't already running?"
puts
"Just start thin with bundle exec thin start."
Process
.
exit
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment