Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Flask_User_Reg
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Mitchell Moore
Flask_User_Reg
Commits
95352a2b
Commit
95352a2b
authored
5 years ago
by
Ravi Tripathi
Browse files
Options
Downloads
Patches
Plain Diff
Removing unused functions and commented out lines
parent
9129b89e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
Add rabbitmq connection
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/__init__.py
+0
-5
0 additions, 5 deletions
app/__init__.py
app/templates/auth/SignUp.html
+0
-3
0 additions, 3 deletions
app/templates/auth/SignUp.html
tasks.py
+0
-7
0 additions, 7 deletions
tasks.py
with
0 additions
and
15 deletions
app/__init__.py
+
0
−
5
View file @
95352a2b
...
...
@@ -21,10 +21,6 @@ def create_app(config_name):
def
index
():
global
return_url
#if 'username' not in session:
# session['username'] = "name_test" + str(random.randint(0, 10000))
# #session['username'] = session['bid']
if
'
uid
'
not
in
session
:
session
[
'
uid
'
]
=
str
(
uuid
.
uuid4
())
...
...
@@ -32,7 +28,6 @@ def create_app(config_name):
return_url
=
request
.
args
.
get
(
"
redir
"
)
or
"
/pun/sys/dashboard
"
return
render_template
(
'
auth/SignUp.html
'
,
room_id
=
session
[
'
uid
'
])
#return render_template('auth/SignUp.html', user=session['username'], room_id=session['uid'])
# misc page error catching
@app.errorhandler
(
403
)
...
...
This diff is collapsed.
Click to expand it.
app/templates/auth/SignUp.html
+
0
−
3
View file @
95352a2b
...
...
@@ -11,9 +11,6 @@
var
socket
=
io
.
connect
(
'
http://
'
+
document
.
domain
+
'
:
'
+
location
.
port
);
socket
.
on
(
'
connect
'
,
function
()
{
/* socket.emit( 'user connected', {
user: document.getElementById("username").innerText
} ) */
socket
.
emit
(
'
join_room
'
)
socket
.
on
(
'
creating account
'
,
function
(
msg
)
{
...
...
This diff is collapsed.
Click to expand it.
tasks.py
+
0
−
7
View file @
95352a2b
...
...
@@ -7,10 +7,8 @@ from gevent import monkey
monkey
.
patch_all
(
subprocess
=
True
)
broker_url
=
'
amqp://reggie:reggie@ohpc:5672/
'
#broker_url = 'amqp://'
celery
=
Celery
(
'
flask_user_reg
'
,
broker
=
broker_url
)
#socketio = SocketIO(message_queue='amqp:///socketio')
socketio
=
SocketIO
(
message_queue
=
'
amqp://reggie:reggie@ohpc:5672/socketio
'
)
def
send_msg
(
event
,
room
):
...
...
@@ -20,14 +18,9 @@ def send_msg(event, room):
@celery.task
def
celery_create_account
(
username
,
fullname
,
reason
,
session
):
room
=
session
# Todo: Ravi's and Louis's code goes here
print
(
time
.
strftime
(
"
%m-%d-%Y_%H:%M:%S
"
)
+
'
\t
User
'
+
username
+
'
added to queue
'
)
send_msg
(
'
creating account
'
,
room
)
#socketio.emit("creating account", room=room)
print
(
username
)
subprocess
.
call
([
"
/opt/rabbitmq_agents/flask_producer.py
"
,
"
ohpc_account_create
"
,
username
])
#time.sleep(5)
print
(
time
.
strftime
(
"
%m-%d-%Y_%H:%M:%S
"
)
+
'
\t
Account successfully created for
'
+
username
)
send_msg
(
'
account ready
'
,
room
)
#socketio.emit('account ready', room=room)
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