Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
c8159ce8
Commit
c8159ce8
authored
Oct 15, 2021
by
janis.streib
🦉
Browse files
FIX: correct use of encoder
parent
51424960
Changes
1
Hide whitespace changes
Inline
Side-by-side
middleware/net_suite/modules/macfinder/views.py
View file @
c8159ce8
...
...
@@ -63,7 +63,7 @@ def create_job():
created_jobs
.
append
(
job_id
)
pipe
=
r
.
pipeline
()
pipe
.
multi
()
pipe
.
set
(
job_id
,
app
.
json_encoder
.
encode
(
MacFinderJob
(
job_id
=
job_id
,
mac
=
request
.
json
[
'mac'
],
vlan
=
vlan
,
bcd
=
request
.
json
[
'bcd'
])))
pipe
.
set
(
job_id
,
app
.
json_encoder
()
.
encode
(
MacFinderJob
(
job_id
=
job_id
,
mac
=
request
.
json
[
'mac'
],
vlan
=
vlan
,
bcd
=
request
.
json
[
'bcd'
])))
pipe
.
expire
(
job_id
,
60
*
60
*
12
)
pipe
.
execute
()
return
jsonify
({
'success'
:
True
,
'job_ids'
:
created_jobs
})
...
...
@@ -78,7 +78,7 @@ def poll(job_id):
job
.
poll
(
session
,
db
,
get_db_conn
())
pipe
=
r
.
pipeline
()
pipe
.
multi
()
pipe
.
set
(
job_id
,
app
.
json_encoder
.
encode
(
job
))
pipe
.
set
(
job_id
,
app
.
json_encoder
()
.
encode
(
job
))
pipe
.
expire
(
job_id
,
60
*
60
*
12
)
pipe
.
execute
()
return
jsonify
(
job
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment